Skip to content

Commit

Permalink
Discovered bug in staging deployment earlier today; incorrect path fo…
Browse files Browse the repository at this point in the history
…r the backend 'entrypoint-init.sh' script in the docker-compose.staging.yml that is used for nightly deployments to dev. Updated the compose yml on dev directly and verified the updated path is correct. Committing directly in order to resolve quickly while everyone is out during the holidays. Tested the failure in the local production compose yml and it had several issues. Updated those at the same time since it paired together. Will observe dev deployment tomorrow to ensure changes applied.
  • Loading branch information
SeriousHorncat committed Dec 30, 2024
1 parent 8dce205 commit e39f7d4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ docker-compose -f docker-compose.local-production.yml up --build
To deploy a production build locally, the following command can be uses.

```bash
docker-compose -f docker-compose.local-production.yml up --build
docker compose -f docker-compose.local-production.yml up --build
```

This command uses the `docker-compose` tool to build and run the necessary containers for the production
Expand Down
23 changes: 16 additions & 7 deletions docker-compose.local-production.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.5'

services:
reverse-proxy:
image: traefik
Expand All @@ -8,17 +6,28 @@ services:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.file.filename=/etc/traefik/config.yml"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
- "--entrypoints.websecure.address=:443"
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- ./etc/traefik/config.yml:/etc/traefik/config.yml:ro
- ./etc/.certificates:/etc/certs:ro
- /var/run/docker.sock:/var/run/docker.sock
networks:
- rosalution-network
labels:
- "traefik.enable=true"
- "traefik.docker.network=rosalution-network"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.rule=Host(`localhost`)"
- "traefik.http.services.traefik.loadbalancer.server.port=8080"

frontend:
build:
Expand All @@ -33,8 +42,8 @@ services:
labels:
- "traefik.enable=true"
- "traefik.docker.network=rosalution-network"
- "traefik.http.routers.frontend-router.entrypoints=web"
- "traefik.http.routers.frontend-router.rule=Host(`localhost`)"
- "traefik.http.routers.frontend-router.tls=true"
- "traefik.http.routers.frontend-router.rule=Host(`local.rosalution.cgds`)"
- "traefik.http.routers.frontend-router.rule=PathPrefix(`/rosalution`)"
- "traefik.http.routers.frontend-router.middlewares=frontend-strip-prefix"
- "traefik.http.middlewares.frontend-strip-prefix.stripprefix.prefixes=/rosalution"
Expand All @@ -52,12 +61,12 @@ services:
environment:
- ROSALUTION_ENV=production
- MONGODB_HOST=rosalution-db
command: ['./etc/entrypoint-init.sh']
command: ['./entrypoint-init.sh']
labels:
- "traefik.enable=true"
- "traefik.docker.network=rosalution-network"
- "traefik.http.routers.backend-router.entrypoints=web"
- "traefik.http.routers.backend-router.rule=PathPrefix(`/rosalution/api`)"
- "traefik.http.routers.backend-router.tls=true"
- "traefik.http.routers.backend-router.rule=Host(`local.rosalution.cgds`) && PathPrefix(`/rosalution/api`)"
- "traefik.http.routers.backend-router.service=backend-api-service"
- "traefik.http.routers.backend-router.middlewares=backend-strip-prefix"
- "traefik.http.middlewares.backend-strip-prefix.stripprefix.prefixes=/rosalution/api"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
- ROSALUTION_ENV=production
- MONGODB_HOST=rosalution-db
- CAS_LOGIN_ENABLE=True
command: ['./etc/entrypoint-init.sh']
command: ['./entrypoint-init.sh']
deploy:
labels:
- "traefik.enable=true"
Expand Down

0 comments on commit e39f7d4

Please sign in to comment.