-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
87 lines (81 loc) · 2.3 KB
/
docker-compose.yaml
File metadata and controls
87 lines (81 loc) · 2.3 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
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
ports:
- '${DB_PORT}:5432'
volumes:
- ./tmp/db-data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${DB_USER} -d ${DB_NAME}']
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:latest
restart: unless-stopped
ports:
- '${REDIS_PORT}:6379'
command: redis-server --appendonly yes
volumes:
- ./tmp/redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
typesense:
image: typesense/typesense:30.1
restart: unless-stopped
ports:
- "${TYPESENSE_PORT}:8108"
environment:
TYPESENSE_API_KEY: ${TYPESENSE_API_KEY}
volumes:
- ./tmp/typesense-data:/data
command: >
--data-dir /data
--enable-cors
minio:
image: minio/minio:latest
restart: unless-stopped
environment:
MINIO_ROOT_USER: ${S3_ACCESS_KEY_ID:-admin}
MINIO_ROOT_PASSWORD: ${S3_SECRET_ACCESS_KEY:-password123}
ports:
- "${S3_PORT:-9900}:9000"
- "${S3_CONSOLE_PORT:-9901}:9001"
volumes:
- ./tmp/minio-data:/data
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 5
minio-setup:
image: minio/mc:latest
depends_on:
minio:
condition: service_healthy
environment:
MINIO_ROOT_USER: ${S3_ACCESS_KEY_ID:-admin}
MINIO_ROOT_PASSWORD: ${S3_SECRET_ACCESS_KEY:-password123}
S3_BUCKET: ${S3_BUCKET:-avatars}
entrypoint: >
/bin/sh -c "
echo Waiting for MinIO...;
mc alias set myminio http://minio:9000 $${MINIO_ROOT_USER} $${MINIO_ROOT_PASSWORD};
if ! mc ls myminio/$${S3_BUCKET} > /dev/null 2>&1; then
echo Creating bucket $${S3_BUCKET}...;
mc mb myminio/$${S3_BUCKET};
mc anonymous set download myminio/$${S3_BUCKET};
echo Bucket $${S3_BUCKET} created and set to public read.;
else
echo Bucket $${S3_BUCKET} already exists.;
fi
"