-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (69 loc) · 2.26 KB
/
Copy pathdocker-compose.yml
File metadata and controls
69 lines (69 loc) · 2.26 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
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-lingospeak}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-lingospeak}
POSTGRES_DB: ${POSTGRES_DB:-lingospeak}
ports: ['15432:5432']
volumes: [postgres_data:/var/lib/postgresql/data]
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}']
interval: 5s
timeout: 5s
retries: 20
networks: [lingospeak]
redis:
image: redis:7-alpine
ports: ['16379:6379']
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 3s
retries: 20
networks: [lingospeak]
minio:
image: minio/minio:latest
command: server /data --console-address :9001
environment:
MINIO_ROOT_USER: ${S3_ACCESS_KEY:-minio}
MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY:-change-me}
MINIO_API_CORS_ALLOW_ORIGIN: '${WEB_URL:-http://localhost:3000},http://127.0.0.1:3000'
ports: ['19000:9000', '19001:9001']
volumes: [minio_data:/data]
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 5s
timeout: 5s
retries: 20
networks:
lingospeak:
aliases: [minio]
minio-init:
image: minio/mc:latest
depends_on:
minio:
condition: service_healthy
entrypoint: ['/bin/sh', '-c']
command:
- >-
attempts=0;
until mc alias set local http://minio:9000 ${S3_ACCESS_KEY:-minio} ${S3_SECRET_KEY:-change-me}; do
attempts=$$((attempts + 1));
if [ "$$attempts" -ge 15 ]; then
echo "Blocking: minio-init could not resolve or connect to the MinIO service on the Compose network." >&2;
exit 1;
fi;
sleep 2;
done;
mc mb --ignore-existing local/${S3_BUCKET:-lingospeak};
mc cp /seed/demo-certificate.pdf local/${S3_BUCKET:-lingospeak}/seed/certificate.pdf;
mc cp /seed/demo-certificate.pdf local/${S3_BUCKET:-lingospeak}/seed/teacher-id.pdf;
mc anonymous set none local/${S3_BUCKET:-lingospeak}
restart: 'no'
networks: [lingospeak]
volumes: ['./docker/minio-seed:/seed:ro']
volumes: { postgres_data: {}, minio_data: {} }
networks:
lingospeak:
driver: bridge