-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose.yaml
87 lines (80 loc) · 2.52 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
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
version: '3.8'
name: mu2mi
services:
postgres:
image: postgres:16.1-alpine3.19
container_name: postgres
restart: unless-stopped
environment:
- PGUSER=postgres
- POSTGRES_PASSWORD=awesomepassword
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- '5432:5432'
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
interval: 1s
timeout: 5s
retries: 10
web-migration:
build:
context: .
dockerfile: migration.Dockerfile
target: migration
container_name: web-migration
restart: no
environment:
- DATABASE_URL=${DATABASE_URL}
depends_on:
postgres:
condition: service_healthy
network_mode: host
redis:
image: redis:7.2.4-alpine
container_name: redis
restart: unless-stopped
command: redis-server --save 60 1 --loglevel warning
volumes:
- redis-data:/data
ports:
- '6379:6379'
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 1s
timeout: 5s
retries: 10
minio:
image: quay.io/minio/minio:RELEASE.2024-01-18T22-51-28Z
container_name: minio
restart: unless-stopped
command: server /data --console-address :9001
environment:
- MINIO_ROOT_USER=${S3_ACCESS_KEY}
- MINIO_ROOT_PASSWORD=${S3_SECRET_KEY}
ports:
- 9000:9000
- 9001:9001
volumes:
- minio_data:/data
healthcheck:
test: ['CMD', 'mc', 'ready', 'local']
interval: 1s
timeout: 5s
retries: 10
bucket-init:
image: minio/mc:RELEASE.2024-03-30T15-29-52Z.fips
container_name: bucket-init
restart: no
entrypoint: /bin/sh -c "/usr/bin/mc config host add minio http://minio:9000 ${S3_ACCESS_KEY} ${S3_SECRET_KEY}; /usr/bin/mc mb --ignore-existing minio/${S3_BUCKET_NAME}; /usr/bin/mc anonymous set public minio/${S3_BUCKET_NAME}; /usr/bin/mc ilm rule add --expire-days 30 minio/${S3_BUCKET_NAME}; exit 0;"
environment:
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- S3_BUCKET_NAME=${S3_BUCKET_NAME}
depends_on:
minio:
condition: service_healthy
volumes:
postgres-data:
redis-data:
minio_data: