-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
52 lines (49 loc) · 1.41 KB
/
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
services:
minio:
image: minio/minio
ports:
- "0.0.0.0:9000:9000"
volumes:
- minio-volume:/data
command: server --console-address ":9001" /data
environment:
MINIO_ROOT_USER: ${PLANTY_AWS_ACCESS_KEY_ID}
MINIO_ROOT_PASSWORD: ${PLANTY_AWS_SECRET_ACCESS_KEY}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 1s
timeout: 1s
retries: 5
start_period: 10s
minio-createbuckets:
image: minio/mc
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set myminio http://minio:9000 ${PLANTY_AWS_ACCESS_KEY_ID} ${PLANTY_AWS_SECRET_ACCESS_KEY};
/usr/bin/mc mb myminio/${PLANTY_AWS_ATTACHMENTS_BUCKET};
/usr/bin/mc anonymous set download myminio/${PLANTY_AWS_ATTACHMENTS_BUCKET};
exit 0;
"
db:
image: postgres:16
restart: always
ports:
- ${PLANTY_DB_PORT}:5432
environment:
- POSTGRES_DB=${PLANTY_DB_NAME}
- POSTGRES_PASSWORD=${PLANTY_DB_PASS}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- postgres-volume:/var/lib/postgresql/data
- ./planty/tests/create_test_db.sql:/docker-entrypoint-initdb.d/create_test_db.sql
profiles: [with-postgres]
volumes:
postgres-volume:
minio-volume: