-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.test.yaml
More file actions
97 lines (91 loc) · 3.19 KB
/
compose.test.yaml
File metadata and controls
97 lines (91 loc) · 3.19 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# compose.test.yaml - Test environment for develop branch
# Deploy to: dev.portal.hotosm.org (107.21.77.122)
# Requires: Traefik running in /opt/traefik with hotosm-test network
services:
migrate:
image: ghcr.io/hotosm/portal-backend:latest
command: ["uv", "run", "alembic", "upgrade", "head"]
depends_on:
db:
condition: service_healthy
environment:
- DATABASE_URL=postgresql+asyncpg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
networks:
- internal
restart: "no"
frontend:
image: ghcr.io/hotosm/portal-frontend:latest
restart: unless-stopped
depends_on:
- backend
networks:
- hotosm-test
healthcheck:
test: ["CMD-SHELL", "wget --quiet --tries=1 --spider http://127.0.0.1/ || exit 1"]
interval: 30s
timeout: 3s
start_period: 5s
retries: 3
labels:
- "traefik.enable=true"
- "traefik.http.routers.portal-frontend.rule=Host(`dev.portal.hotosm.org`) && !PathPrefix(`/api`)"
- "traefik.http.routers.portal-frontend.entrypoints=websecure"
- "traefik.http.routers.portal-frontend.tls.certresolver=letsencrypt"
- "traefik.http.services.portal-frontend.loadbalancer.server.port=80"
backend:
image: ghcr.io/hotosm/portal-backend:latest
restart: unless-stopped
depends_on:
db:
condition: service_healthy
migrate:
condition: service_completed_successfully
environment:
- DATABASE_URL=postgresql+asyncpg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- DEBUG=false
- HANKO_API_URL=https://dev.login.hotosm.org
- JWT_ISSUER=auto
- COOKIE_SECRET=${COOKIE_SECRET}
- COOKIE_DOMAIN=.hotosm.org
- OSM_CLIENT_ID=${OSM_CLIENT_ID}
- OSM_CLIENT_SECRET=${OSM_CLIENT_SECRET}
- OSM_REDIRECT_URI=https://dev.portal.hotosm.org/api/auth/osm/callback
- ADMIN_EMAILS=${ADMIN_EMAILS}
- DRONE_TM_BACKEND_URL=https://testlogin.dronetm.hotosm.org/api
- FAIR_API_BASE_URL=https://testlogin.fair.hotosm.org/api/v1
- UMAP_BASE_URL=https://testlogin.umap.hotosm.org
- EXPORT_TOOL_API_BASE_URL=https://testlogin.export.hotosm.org/api
- DRONE_TM_VERIFY_SSL=true
- FAIR_VERIFY_SSL=true
networks:
- hotosm-test
- internal
labels:
- "traefik.enable=true"
- "traefik.http.routers.portal-backend.rule=Host(`dev.portal.hotosm.org`) && PathPrefix(`/api`)"
- "traefik.http.routers.portal-backend.entrypoints=websecure"
- "traefik.http.routers.portal-backend.tls.certresolver=letsencrypt"
- "traefik.http.services.portal-backend.loadbalancer.server.port=8000"
db:
image: postgis/postgis:16-3.4
restart: unless-stopped
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- portal-db:/var/lib/postgresql/data
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
networks:
- internal
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
networks:
hotosm-test:
external: true
internal:
volumes:
portal-db: