generated from betagouv/template-nextjs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
107 lines (100 loc) · 2.73 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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
# Initializes the MongoDB replica set. This service will not usually be actively running
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" }]})'''
# electric:
# image: electricsql/electric:0.12.0
# depends_on:
# - pg
# environment:
# DATABASE_REQUIRE_SSL: false
# DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@pg:${POSTGRES_PORT}/${POSTGRES_DB}
# AUTH_JWT_KEY: ${JWT_SECRET}
# PG_PROXY_PASSWORD: ${PG_PROXY_PASSWORD}
# PG_PROXY_PORT: ${PG_PROXY_PORT}
# AUTH_MODE: secure
# LOGICAL_PUBLISHER_HOST: electric
# AUTH_JWT_ALG: HS256
# ELECTRIC_PG_PROXY_PORT: 65432
# ports:
# - ${ELECTRIC_PORT}:5133
# - ${PG_PROXY_PORT}:65432
# restart: always
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