Skip to content

Commit

Permalink
Merge pull request #380 from hearchco/as/fix/port
Browse files Browse the repository at this point in the history
fix: default port and aws bootstrap binary
  • Loading branch information
aleksasiriski authored Aug 26, 2024
2 parents 9bbcfee + dfda1c4 commit 5de40d1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 20 deletions.
34 changes: 17 additions & 17 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
version: '3.9'
version: "3.9"
services:
# Traefik can be replaced with any reverse proxy, this is just an example
traefik:
image: docker.io/library/traefik:latest # NOTE: Don't use the latest tag in production
command:
- '--providers.docker=true'
- '--providers.docker.exposedbydefault=false'
- '--entryPoints.web.address=:80'
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entryPoints.web.address=:80"
ports:
- '80:80'
- "80:80"
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- "/var/run/docker.sock:/var/run/docker.sock:ro"
restart: unless-stopped
# SvelteKit frontend, used for server-side rendering and serving web browser clients
frontend:
image: ghcr.io/hearchco/frontend:latest # NOTE: Don't use the latest tag in production
environment:
- PUBLIC_URI=https://search.example.org # Public accessible URI of the frontend, used to generate opensearch.xml
- API_URI=http://agent:3030 # Frontend reachable URI of the agent, used for fetching data when server-side rendering
- API_URI=http://agent:8000 # Frontend reachable URI of the agent, used for fetching data when server-side rendering
- PUBLIC_API_URI=https://api.search.example.org # Public accessible URI of the agent, used for fetching data from the browser (using JS)
restart: unless-stopped
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.frontend.rule=Host(`search.example.org`)'
- 'traefik.http.routers.frontend.entrypoints=web'
- 'traefik.http.services.frontend.loadbalancer.server.port=3000' # This is the port defined in the Dockerfile for frontend
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=Host(`search.example.org`)"
- "traefik.http.routers.frontend.entrypoints=web"
- "traefik.http.services.frontend.loadbalancer.server.port=8080" # This is the port defined in the Dockerfile for frontend
# Go agent, used for scraping search engines and other data sources and serving a JSON REST API for frontend
agent:
image: ghcr.io/hearchco/agent:latest # NOTE: Don't use the latest tag in production
Expand All @@ -38,16 +38,16 @@ services:
- HEARCHCO_SERVER_IMAGEPROXY_SECRETKEY=super_secret_key_that_is_at_least_32_chars_long # Used by image proxy for hashing image URLs, set to something long and secure
restart: unless-stopped
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.agent.rule=Host(`api.search.example.org`)'
- 'traefik.http.routers.agent.entrypoints=web'
- 'traefik.http.services.agent.loadbalancer.server.port=3030' # This is the port defined in the Dockerfile for agent
- "traefik.enable=true"
- "traefik.http.routers.agent.rule=Host(`api.search.example.org`)"
- "traefik.http.routers.agent.entrypoints=web"
- "traefik.http.services.agent.loadbalancer.server.port=8000" # This is the port defined in the Dockerfile for agent
redis:
image: docker.io/library/redis:latest # NOTE: Don't use the latest tag in production
command:
- '--requirepass=redispassword'
- "--requirepass=redispassword"
volumes:
- 'redis-vol-0:/data:Z'
- "redis-vol-0:/data:Z"
restart: unless-stopped
volumes:
redis-vol-0:
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM cgr.dev/chainguard/static:latest

COPY hearchco .
COPY bootstrap ./hearchco

CMD [ "./hearchco" ]

EXPOSE 3030
EXPOSE 8000

LABEL org.opencontainers.image.source="https://github.com/hearchco/agent"
1 change: 1 addition & 0 deletions goreleaser/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ builds:
goos:
- linux
main: ./src
binary: bootstrap
goarch:
- amd64
ldflags:
Expand Down
1 change: 1 addition & 0 deletions goreleaser/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ builds:
goos:
- linux
main: ./src
binary: bootstrap
goarch:
- amd64
- arm64
Expand Down
2 changes: 1 addition & 1 deletion src/config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func New() Config {
return Config{
Server: Server{
Environment: "normal",
Port: 3030,
Port: 8000,
FrontendUrls: []string{"http://localhost:5173"},
Cache: Cache{
Type: "none",
Expand Down

0 comments on commit 5de40d1

Please sign in to comment.