generated from betagouv/template-nextjs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
88 lines (81 loc) · 2.05 KB
/
docker-compose.yaml
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
version: "3.1"
volumes:
pg_data:
minio_data:
mongo_storage:
services:
pg:
image: postgres:14-alpine
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PORT: ${POSTGRES_PORT}
command:
- -c
- listen_addresses=*
- -c
- wal_level=logical
ports:
- ${POSTGRES_PORT}:5432
restart: always
volumes:
- pg_data:/var/lib/postgresql/data
- ./db/init/:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 5s
timeout: 5s
retries: 5
mongo:
image: mongo:7.0
command: --replSet rs0 --bind_ip_all --quiet
restart: unless-stopped
ports:
- 27017:27017
volumes:
- mongo_storage:/data/db
mongo-rs-init:
image: mongo:7.0
depends_on:
- mongo
restart: on-failure
entrypoint:
- bash
- -c
- 'mongosh --host mongo:27017 --eval ''try{rs.status().ok && quit(0)} catch {} rs.initiate({_id: "rs0", version:
1, members: [{ _id: 0, host : "mongo:27017" }]})'''
powersync:
restart: unless-stopped
depends_on:
mongo-rs-init:
condition: service_completed_successfully
pg:
condition: service_healthy
image: journeyapps/powersync-service:latest
command: ["start", "-r", "unified"]
volumes:
- ./powersync-config.yaml:/config/config.yaml
environment:
POWERSYNC_CONFIG_PATH: /config/config.yaml
PS_DATABASE_URL: ${PS_DATABASE_URL}
PS_JWT_SECRET: ${JWT_SECRET}
PS_PORT: ${POWERSYNC_PORT:-3003}
ports:
- ${POWERSYNC_PORT:-3003}:8080
adminer:
image: adminer
restart: always
ports:
- "${ADMINER_PORT:-8081}:8080"
minio:
image: minio/minio
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
environment:
MINIO_ROOT_USER: ${MINIO_USER}
MINIO_ROOT_PASSWORD: ${MINIO_PASSWORD}
command: server --console-address ":9001" /data