-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
119 lines (113 loc) · 3.39 KB
/
docker-compose.yml
File metadata and controls
119 lines (113 loc) · 3.39 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version: '3.8'
services:
db:
image: postgres:18
container_name: almalinux_db2
restart: always
environment:
- POSTGRES_DB=almalinux_members
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- postgres_data2:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
mailhog:
image: mailhog/mailhog
container_name: almalinux_mailhog
command:
- -jim-accept=0.25
- -jim-disconnect=0.25
- -jim-reject-sender=0.25
- -jim-reject-recipient=0.25
- -jim-reject-auth=0.25
ports:
- "8025:8025"
- "1025:1025"
minio:
image: minio/minio:latest
container_name: almalinux_minio
command: server /data --console-address ":9001"
environment:
- MINIO_ROOT_USER=minio
- MINIO_ROOT_PASSWORD=minio12345
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:9000/minio/health/live"]
interval: 5s
timeout: 3s
retries: 20
minio_init:
image: minio/mc:latest
container_name: almalinux_minio_init
depends_on:
minio:
condition: service_healthy
entrypoint: ["/bin/sh", "-c"]
command: >
"mc alias set local http://minio:9000 minio minio12345 &&
mc mb -p local/astra-media || true &&
mc anonymous set download local/astra-media || true"
web:
build: .
container_name: almalinux_web2
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/app:z
- ./rekor-signing-key.pem:/run/secrets/rekor-signing-key.pem:ro,z
ports:
- "8000:8000"
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import sys, requests; r = requests.get('http://127.0.0.1:8000/readyz', timeout=2); sys.exit(0 if (r.status_code == 200 and r.json().get('status') == 'ready') else 1)",
]
interval: 5s
timeout: 3s
retries: 10
start_period: 20s
depends_on:
db:
condition: service_healthy
minio:
condition: service_healthy
environment:
- DEBUG=True
- SECRET_KEY=dev_secret_key
# Error reporting (Bugsink is Sentry-compatible). Get the DSN from Bugsink UI.
# - SENTRY_DSN=http://fed1fa2cb35545a0873e5a36b5865bb8@bugsink:8080/1
# - SENTRY_ENVIRONMENT=development
# - SENTRY_RELEASE=dev
# - SENTRY_SEND_DEFAULT_PII=False
#- DJANGO_AUTO_MIGRATE=1
- DATABASE_URL=postgres://postgres:postgres@almalinux_db2:5432/almalinux_members
- EMAIL_URL=smtp://almalinux_mailhog:1025
- FREEIPA_HOST=ipa.tinystage.test
- FREEIPA_VERIFY_SSL=False
- FREEIPA_SERVICE_USER=admin
- FREEIPA_SERVICE_PASSWORD=password
- AWS_ACCESS_KEY_ID=minio
- AWS_SECRET_ACCESS_KEY=minio12345
- AWS_STORAGE_BUCKET_NAME=astra-media
- AWS_S3_REGION_NAME=us-east-1
- AWS_S3_ENDPOINT_URL=http://minio:9000
- AWS_S3_ADDRESSING_STYLE=path
- AWS_QUERYSTRING_AUTH=False
- PUBLIC_BASE_URL=http://localhost:8000
- AWS_S3_DOMAIN=http://localhost:9000
- SELF_SERVICE_ADDRESS_COUNTRY_ATTR=fasstatusnote
- ELECTION_REKOR_ENDPOINT=https://rekor.sigstore.dev
- ELECTION_REKOR_SIGNING_KEY=/run/secrets/rekor-signing-key.pem
volumes:
postgres_data2:
minio_data: