forked from tedivm/tedivms-flask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
116 lines (100 loc) · 3.13 KB
/
docker-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
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
version: "3"
services:
app:
build:
context: .
dockerfile: dockerfile.app
environment:
- CELERY_BROKER=rabbitmq
- SQLALCHEMY_DATABASE_URI=postgres://dbuser:dbpassword@postgres/dbname
- SECRET_KEY=NotSecure
- DEBUG=true
#
# Keep the lines below uncommented when using standard user management.
# Make sure they are commented out when using LDAP.
#
- ADMIN_USERNAME=admin
- ADMIN_EMAIL=admin@example.com
- ADMIN_PASSWORD=Password1
- DEV_USERNAME=developer
- DEV_EMAIL=dev@example.com
- DEV_PASSWORD=Password1
- USER_USERNAME=user
- USER_EMAIL=user@example.com
- USER_PASSWORD=Password1
#
# Uncomment below to enable LDAP.
#
#
# - USER_LDAP=true
# - LDAP_HOST=ldap://ldap
# - LDAP_BIND_DN=cn=admin,dc=example,dc=org
# - LDAP_BIND_PASSWORD=admin
# - LDAP_USERNAME_ATTRIBUTE=cn
# - LDAP_USER_BASE=ou=users,dc=example,dc=org
# - LDAP_GROUP_OBJECT_CLASS=posixGroup
# - LDAP_GROUP_ATTRIBUTE=cn
# - LDAP_GROUP_BASE=ou=groups,dc=example,dc=org
# - LDAP_GROUP_TO_ROLE_ADMIN=admin
# - LDAP_GROUP_TO_ROLE_DEV=dev
# - LDAP_GROUP_TO_ROLE_USER=user
# - LDAP_EMAIL_ATTRIBUTE=mail
ports:
- "80:80"
- "5000:5000"
volumes:
- ./docker/app/uwsgi.ini:/app/uwsgi.ini
- ./docker/app/prestart.sh:/app/prestart.sh
- ./app:/app/app
- ./manage.py:/app/manage.py
- ./unicorn.py:/app/unicorn.py
# If the app needs AWS access and you have it configured on your host uncomment these lines.
# - ~/.aws/credentials:/home/apprunner/.aws/credentials
# - ~/.aws/config:/home/apprunner/.aws/config
worker:
build:
context: .
dockerfile: dockerfile.worker
environment:
- CELERY_BROKER=rabbitmq
- SQLALCHEMY_DATABASE_URI=postgres://dbuser:dbpassword@postgres/dbname
- ADMIN_EMAIL=admin@example.com
- ADMIN_PASSWORD=Password1
- USER_EMAIL=user@example.com
- USER_PASSWORD=Password1
- SECRET_KEY=NotSecure
volumes:
- ./app:/app/app
- ./docker/worker/start_worker.sh:/home/apprunner/start_worker.sh
# If the app needs AWS access and you have it configured on your host uncomment these lines.
# - ~/.aws/credentials:/home/apprunner/.aws/credentials
# - ~/.aws/config:/home/apprunner/.aws/config
postgres:
image: postgres
environment:
POSTGRES_USER: dbuser
POSTGRES_PASSWORD: dbpassword
POSTGRES_DB: dbname
rabbitmq:
image: rabbitmq
#
# Uncomment to enable LDAP- make sure to set `USER_LDAP` in the app as well.
#
#
# ldap:
# image: osixia/openldap
# command: --copy-service
# volumes:
# - ./docker/ldap/bootstrap.ldif:/container/service/slapd/assets/config/bootstrap/ldif/50-bootstrap.ldif:ro
# environment:
# LDAP_REMOVE_CONFIG_AFTER_SETUP: "false"
#
# phpldapadmin:
# image: osixia/phpldapadmin:latest
# environment:
# PHPLDAPADMIN_LDAP_HOSTS: "ldap"
# PHPLDAPADMIN_HTTPS: "false"
# ports:
# - "8080:80"
# depends_on:
# - ldap