-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
53 lines (51 loc) · 1.77 KB
/
docker-compose.prod.yml
File metadata and controls
53 lines (51 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
services:
app:
container_name: app
image: app_image
env_file:
- .env
build:
context: .
dockerfile: Dockerfile.prod
volumes:
- ./:/src
ports:
- "9898:9000"
prefect-server:
image: prefecthq/prefect:3.6.28-python3.14
container_name: prefect_server
command: prefect server start --host 0.0.0.0
environment:
PREFECT_SERVER_DATABASE_CONNECTION_URL: "${PREFECT_DB_URL}"
PREFECT_SERVER_API_AUTH_STRING: "${PREFECT_AUTH_STRING}"
PREFECT_UI_API_URL: "https://prefect.swanrate.com/api"
PREFECT_SERVER_SERVICES_DB_VACUUM_ENABLED: "true"
PREFECT_SERVER_SERVICES_DB_VACUUM_RETENTION_PERIOD: "7776000"
labels:
- traefik.enable=true
- traefik.http.routers.prefect-https.entryPoints=https
- traefik.http.routers.prefect-https.rule=Host(`prefect.swanrate.com`)
- traefik.http.routers.prefect-https.tls=true
- traefik.http.routers.prefect-https.tls.certresolver=letsencrypt
- traefik.http.services.prefect-https.loadbalancer.server.port=4200
- traefik.http.routers.prefect-http.entryPoints=http
- traefik.http.routers.prefect-http.rule=Host(`prefect.swanrate.com`)
- traefik.http.routers.prefect-http.middlewares=redirect-to-https
- traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
restart: unless-stopped
prefect-runner:
container_name: prefect_runner
image: app_image
env_file:
- .env
environment:
PREFECT_API_URL: "http://prefect-server:4200/api"
PREFECT_API_AUTH_STRING: "${PREFECT_AUTH_STRING}"
PYTHONPATH: "/src"
build:
context: .
dockerfile: Dockerfile.prod
command: python scripts/serve_flows.py
depends_on:
- prefect-server
restart: unless-stopped