-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
63 lines (59 loc) · 1.53 KB
/
docker-compose.yaml
File metadata and controls
63 lines (59 loc) · 1.53 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
name: wikibase-metadata
services:
database:
image: postgres:16-alpine
volumes:
- ./postgres-database:/var/lib/postgresql/data:z
expose:
- 5432
environment:
POSTGRES_DB: db
POSTGRES_USER: user
POSTGRES_PASSWORD: app
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256 --auth-local=scram-sha-256
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d db"]
interval: 5s
timeout: 3s
retries: 12
backend:
image: wikibase-metadata-backend
build:
context: ./backend
group_add:
- ${TEAM_GID}
expose:
- 8000
volumes:
- ./logs/:/app/logs/:z
- ./data/wikibase-data.latest.db:/app/data/wikibase-data.latest.db:z
environment:
AUTH_TOKEN: ${AUTH_TOKEN}
DATABASE_URL: postgresql+asyncpg://user:app@database:5432/db
DATABASE_URL_SYNC: postgresql://user:app@database:5432/db
LOG_LEVEL: ${LOG_LEVEL}
SETTINGS_FILE: ${SETTINGS_FILE}
restart: unless-stopped
depends_on:
database:
condition: service_healthy
entrypoint: "./entrypoint.sh"
frontend:
image: wikibase-metadata-frontend
build:
context: ./frontend
args:
VITE_BACKEND_URL: http://backend:8000/graphql
expose:
- 3000
environment:
VITE_BACKEND_URL: http://backend:8000/graphql
restart: unless-stopped
nginx:
image: nginx:alpine
ports:
- 80:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on: [backend, frontend]
restart: unless-stopped