-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
70 lines (63 loc) · 1.67 KB
/
docker-compose.yml
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
version: "3.7"
volumes:
postgres_data: {}
s3_data: {}
x-env: &env_list
- POSTGRES_PASSWORD=django_pass
- POSTGRES_USER=django_user
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=django_user
- DJANGO_ADMIN_URL=^admin/
- DJANGO_SETTINGS_MODULE=config.settings.production
- DJANGO_SECRET_KEY=fantastic # Don't use in prod
- DJANGO_ALLOWED_HOSTS=.dotman.ca,localhost,webapp
- DJANGO_SECURE_SSL_REDIRECT=False
- DJANGO_ACCOUNT_ALLOW_REGISTRATION=True
- USE_S3=True
- AWS_S3_ENDPOINT_URL=http://host.docker.internal:9000
- AWS_ACCESS_KEY_ID=minioadmin
- AWS_SECRET_ACCESS_KEY=minioadmin
- AWS_STORAGE_BUCKET_NAME=dotmanca
- AWS_S3_REGION_NAME=
- "AWS_S3_URL_PROTOCOL=http:"
- AWS_S3_CUSTOM_DOMAIN=localhost:9000/dotmanca
- STATIC_LOCATION=static
- PUBLIC_MEDIA_LOCATION=media
services:
webapp:
build:
context: .
environment: *env_list
ports:
- "8080:8080"
postgres:
image: postgres:16
volumes:
- postgres_data:/var/lib/postgresql/data
environment: *env_list
ports:
- "5432:5432"
s3:
image: quay.io/minio/minio
volumes:
- s3_data:/data
command: server /data --console-address ":9001"
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
ports:
- "9000:9000"
- "9001:9001"
createbucket:
image: minio/mc
depends_on:
- s3
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add dotmans3 http://s3:9000 minioadmin minioadmin;
/usr/bin/mc rm -r --force dotmans3/dotmanca;
/usr/bin/mc mb dotmans3/dotmanca;
/usr/bin/mc policy download dotmans3/dotmanca;
exit 0;
"