-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.local.yml
More file actions
49 lines (49 loc) · 1.24 KB
/
compose.local.yml
File metadata and controls
49 lines (49 loc) · 1.24 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
services:
db:
image: postgres:16
container_name: website-db
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
volumes:
- ./data/db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
interval: 5s
timeout: 5s
retries: 5
ports:
- 5432:5432
s3:
image: minio/minio
restart: unless-stopped
container_name: website-minio
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: ${S3_USER}
MINIO_ROOT_PASSWORD: ${S3_PASSWORD}
volumes:
- ./data/s3:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 5
ports:
- 9000:9000
- 9001:9001
create-bucket:
image: minio/mc
depends_on:
s3:
condition: service_healthy
restart: no
container_name: website-create-bucket
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set minio http://website-minio:9000 ${S3_USER} ${S3_PASSWORD};
/usr/bin/mc mb minio/${S3_NAME} --ignore-existing;
exit 0;
"