-
Notifications
You must be signed in to change notification settings - Fork 5
/
prod.docker-compose.yml
91 lines (78 loc) · 1.71 KB
/
prod.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: "3.3"
services:
# LDAP-related
ldap:
image: osixia/openldap:1.3.0
restart: always
env_file:
- .env
volumes:
- ldap_data:/var/lib/ldap
- ldap_slapd:/etc/ldap/slapd.d
phpldapadmin:
image: osixia/phpldapadmin:0.9.0
restart: always
ports:
- 8081:443
environment:
PHPLDAPADMIN_LDAP_HOSTS: ldap
depends_on:
- ldap
# Database-related
database:
image: postgres:12.2-alpine
restart: always
env_file:
- .env
volumes:
- database:/var/lib/postgresql/data
# Service-related
api:
build:
context: ./api
dockerfile: prod.Dockerfile
args:
FLASK_API_VERSION: ${FLASK_API_VERSION}
image: flavienb/reactjs-flask-ldap-boilerplate-api:latest
restart: always
volumes:
- api_logs:/logs
- api_migrations:/migrations
env_file:
- .env
environment:
FLASK_LEVEL: "dev" # dev, test or prod
LOG_LEVEL: "DEBUG" # DEBUG, INFO, WARNING or ERROR
depends_on:
- ldap
- database
app:
build:
context: ./app
dockerfile: prod.Dockerfile
image: flavienb/reactjs-flask-ldap-boilerplate-app:latest
restart: always
environment:
NODE_ENV: "production"
CHOKIDAR_USEPOLLING: "false"
# We set-up NGINX to have a unique endpoint for app & api
nginx:
build:
context: ./nginx
dockerfile: prod.Dockerfile
image: flavienb/reactjs-flask-ldap-boilerplate-nginx:latest
restart: always
ports:
- "8080:80"
volumes:
- nginx_logs:/var/log/nginx
depends_on:
- api
- app
volumes:
api_logs:
nginx_logs:
database:
ldap_data:
ldap_slapd:
api_migrations: