-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
170 lines (158 loc) · 4.67 KB
/
docker-compose.yaml
File metadata and controls
170 lines (158 loc) · 4.67 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
version: "3.1"
volumes:
pg_data:
minio_data:
mongo_storage:
mailpit_data:
services:
pg:
image: postgres:17-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_USER} -d ${POSTGRES_DB}"]
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/powersync-config.yaml:/config/config.yaml
- ./powersync/sync-config.yaml:/config/sync-config.yaml
environment:
POWERSYNC_CONFIG_PATH: /config/config.yaml
PS_DATABASE_URL: ${PS_DATABASE_URL}
PS_JWT_SECRET: ${JWT_SECRET}
PS_PORT: 8080
ports:
- ${POWERSYNC_PORT}:8080
adminer:
image: adminer
restart: always
ports:
- "${ADMINER_PORT}:8080"
minio:
image: minio/minio
ports:
- "${MINIO_SERVER_PORT}:9000"
- "${MINIO_CONSOLE_PORT}:9001"
volumes:
- minio_data:/data
environment:
MINIO_ROOT_USER: ${MINIO_USER}
MINIO_ROOT_PASSWORD: ${MINIO_PASSWORD}
command: server --console-address ":9001" /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 5
minio-init:
image: minio/mc
depends_on:
minio:
condition: service_healthy
environment:
MINIO_USER: ${MINIO_USER}
MINIO_PASSWORD: ${MINIO_PASSWORD}
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY_ID}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
MINIO_BUCKET: ${MINIO_BUCKET}
entrypoint: >
/bin/sh -c " mc alias set local http://minio:9000 $MINIO_USER $MINIO_PASSWORD; mc mb local/$MINIO_BUCKET
--ignore-existing; mc admin user add local $MINIO_ACCESS_KEY_ID $MINIO_SECRET_KEY; mc admin policy attach local
readwrite --user $MINIO_ACCESS_KEY_ID; exit 0; "
keycloak:
image: quay.io/keycloak/keycloak:26.3.5
container_name: keycloak
command: "start-dev --import-realm"
entrypoint: ["/opt/keycloak/entrypoint.sh"]
volumes:
- ./tests/realm-template.json:/opt/keycloak/data/import/realm-template.json
- ./tests/keycloak-entrypoint.sh:/opt/keycloak/entrypoint.sh
environment:
AUTH_CLIENT_ID: ${AUTH_CLIENT_ID}
AUTH_CLIENT_SECRET: ${AUTH_CLIENT_SECRET}
AUTH_ADMIN_CLIENT_ID: ${AUTH_ADMIN_CLIENT_ID}
AUTH_ADMIN_CLIENT_SECRET: ${AUTH_ADMIN_CLIENT_SECRET}
KC_HOSTNAME: localhost
KC_HOSTNAME_PORT: ${KEYCLOAK_PORT}
KC_HOSTNAME_STRICT: false
KC_HOSTNAME_STRICT_HTTPS: false
KC_HOSTNAME_STRICT_BACKCHANNEL: false
KC_HTTP_ENABLED: true
KC_LOG_LEVEL: info
KC_METRICS_ENABLED: true
KC_HEALTH_ENABLED: true
KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN}
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD}
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://pg:5432/${KEYCLOAK_DB}
KC_DB_USERNAME: ${POSTGRES_USER}
KC_DB_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- ${KEYCLOAK_PORT}:8080
depends_on:
- pg
healthcheck:
test:
[
"CMD-SHELL",
"exec 3<>/dev/tcp/localhost/9000 && echo -e 'GET /health/ready HTTP/1.1\r\nHost: localhost\r\nConnection:
close\r\n\r\n' >&3 && cat <&3 | grep -q '\"status\": \"UP\"'",
]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
mailpit:
image: axllent/mailpit
restart: unless-stopped
ports:
- "${SMTP_PORT}:1025"
- "${SMTP_WEB_PORT}:8025"
volumes:
- mailpit_data:/data
environment:
MP_MAX_MESSAGES: 500
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1