Skip to content

Commit

Permalink
Added missing docker-related config for prefect-based services
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogsilva committed Aug 21, 2024
1 parent 637a110 commit e540c7d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 8 deletions.
8 changes: 0 additions & 8 deletions docker/compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,8 @@ services:

prefect-static-worker:
image: *webapp-image
command: [
"start-periodic-tasks",
"--refresh-stations",
"--refresh-monthly-measurements",
"--refresh-seasonal-measurements",
"--refresh-yearly-measurements",
]
environment:
PREFECT_API_URL: "http://prefect-server:4200/api"
ARPAV_PPCV__PREFECT__OBSERVATION_STATIONS_REFRESHER_FLOW_CRON_SCHEDULE: "*/5 * * * *"
PREFECT_DEBUG_MODE: true
<<: *common-env
volumes:
Expand Down
29 changes: 29 additions & 0 deletions docker/compose.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ x-env-file-db: &env-file-db ${ARPAV_PPCV_DEPLOYMENT_ENV_FILE_DB_SERVICE:-/home/a
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}
x-env-file-frontend: &env-file-frontend ${ARPAV_PPCV_DEPLOYMENT_ENV_FILE_FRONTEND_SERVICE:-/home/arpav/environment-files/frontend-service.env}
x-env-file-prefect-db: &env-file-prefect-db ${ARPAV_PPCV_DEPLOYMENT_ENV_FILE_PREFECT_DB_SERVICE:-/home/arpav/environment-files/prefect-db-service.env}
x-env-file-prefect-server: &env-file-prefect-server ${ARPAV_PPCV_DEPLOYMENT_ENV_FILE_PREFECT_SERVER_SERVICE:-/home/arpav/environment-files/prefect-server-service.env}
x-env-file-prefect-static-worker: &env-file-prefect-static-worker ${ARPAV_PPCV_DEPLOYMENT_ENV_FILE_PREFECT_STATIC_WORKER_SERVICE:-/home/arpav/environment-files/prefect-static-worker-service.env}

name: arpav-ppcv-staging

Expand Down Expand Up @@ -126,5 +129,31 @@ services:
target: /additional
restart: unless-stopped

prefect-server:
networks:
- back
labels:
- "traefik.http.routers.prefect-router.entrypoints=web"
- "exposed.inside=true"
env_file:
- *env-file-prefect-server

prefect-static-worker:
networks:
- back
env_file:
- *env-file-prefect-static-worker
restart: unless-stopped

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

volumes:
db-data:
prefect-db-data:
7 changes: 7 additions & 0 deletions docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ services:
prefect-static-worker:
image: *backend-image
entrypoint: ["tini", "-g", "--", "poetry", "run", "arpav-ppcv", "prefect"]
command: [
"start-periodic-tasks",
"--refresh-stations",
"--refresh-monthly-measurements",
"--refresh-seasonal-measurements",
"--refresh-yearly-measurements",
]
depends_on:
prefect-server:
condition: service_healthy
Expand Down

0 comments on commit e540c7d

Please sign in to comment.