Skip to content

Commit

Permalink
Merge pull request #139 from ricardogsilva/hotfix-traefik-integration
Browse files Browse the repository at this point in the history
Fixed more errors with staging-related config
  • Loading branch information
ricardogsilva authored Jun 12, 2024
2 parents 1fe81b2 + a85f848 commit 8d73413
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 9 deletions.
45 changes: 36 additions & 9 deletions docker/compose.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,45 @@
x-env-file-db: &env-file-db ${ARPAV_PPCV_DEPLOYMENT_ENV_FILE_DB_SERVICE:-/home/arpav/environment-files/db-service.env}
x-env-file-legacy-db: &env-file-legacy-db ${ARPAV_PPCV_DEPLOYMENT_ENV_FILE_LEGACY_DB_SERVICE:-/home/arpav/environment-files/legacy-db-service.env}
x-env-file-webapp: &env-file-webapp ${ARPAV_PPCV_DEPLOYMENT_ENV_FILE_WEBAPP_SERVICE:-/home/arpav/environment-files/webapp-service.env}
x-env-file-martin: &env-file-martin ${ARPAV_PPCV_DEPLOYMENT_ENV_FILE_MARTIN_SERVICE:-/home/arpav/environment-files/martin-service.env}

name: arpav-ppcv-staging

networks:

front:
back:

services:

# NOTE: this traefik instance does not deal with TLS at all, as we assume there
# is another proxy running on top of this one, provided
# by the staging env
reverse-proxy:
command: --configFile /opt/traefik/traefik.toml
labels:
- "traefik.enable=true"
- "traefik.http.routers.outside-router-arpav-backend.entrypoints=webSecure"
- "traefik.http.routers.outside-router-arpav-backend.tls=true"
- "traefik.http.routers.outside-router-arpav-backend.tls.certResolver=letsEncryptResolver"
- "traefik.http.routers.outside-router-arpav-backend.rule=Host(`arpav.geobeyond.dev`)"
- "exposed.outside=true"
networks:
- front
- back
volumes:
- type: bind
source: /home/arpav/docker/traefik/staging-config.toml
target: /opt/traefik/traefik.toml

webapp:
networks:
- back
env_file:
- *env-file-webapp
labels:
- "traefik.http.routers.arpav-backend.entrypoints=webSecure"
- "traefik.http.routers.arpav-backend.tls=true"
- "traefik.http.routers.arpav-backend.tls.certResolver=letsEncryptResolver"
- "traefik.http.routers.arpav-backend.rule=Host(`arpav.geobeyond.dev`)"
- "traefik.http.routers.arpav-backend.entrypoints=web"
- "exposed.inside=true"
volumes:
- type: bind
source: $HOME/data/arpav-ppcv/datasets
Expand All @@ -51,30 +67,41 @@ services:
restart: unless-stopped

legacy-db:
networks:
- back
env_file:
- *env-file-legacy-db
volumes:
- legacy-db-data:/var/lib/postgresql/data
restart: unless-stopped

db:
networks:
- back
env_file:
- *env-file-db
volumes:
- db-data:/var/lib/postgresql/data
restart: unless-stopped

martin:
command: ["--config", "/martin-config.yaml"]
networks:
- back
env_file:
- *env-file-webapp
- *env-file-martin
labels:
- "traefik.http.routers.martin-router.entrypoints=webSecure"
- "traefik.http.routers.martin-router.tls=true"
- "traefik.http.routers.martin-router.tls.certResolver=letsEncryptResolver"
- "traefik.http.routers.martin-router.rule=Host(`arpav.geobeyond.dev`)"
- "traefik.http.routers.martin-router.entrypoints=web"
- "exposed.inside=true"
volumes:
- type: bind
source: /home/arpav/docker/martin/config.yaml
target: /martin-config.yaml
restart: unless-stopped

thredds:
networks:
- back
image: unidata/thredds-docker:5.4
env_file:
- *env-file-webapp
Expand Down
2 changes: 2 additions & 0 deletions docker/traefik/staging-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ insecure = true

[providers.docker]
exposedByDefault = false
network = "back"
constraints = "Label(`exposed.inside`, `true`)"

0 comments on commit 8d73413

Please sign in to comment.