Repository navigation
Expand file tree
/
Copy pathcompose.yml
More file actions
79 lines (78 loc) · 1.8 KB
/
Copy pathcompose.yml
File metadata and controls
79 lines (78 loc) · 1.8 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
services:
app:
build:
context: .
depends_on:
db:
condition: service_healthy
s3:
condition: service_healthy
restart: unless-stopped
container_name: website-app
networks:
- nginx_proxy
migrator:
build:
context: .
dockerfile: migrations.dockerfile
depends_on:
db:
condition: service_healthy
s3:
condition: service_healthy
restart: no
container_name: website-migrator
networks:
- nginx_proxy
db:
image: postgres:16
restart: unless-stopped
container_name: website-db
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
networks:
- nginx_proxy
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
networks:
- nginx_proxy
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;
"
networks:
- nginx_proxy
networks:
nginx_proxy:
external: true