-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdocker-compose.yml
75 lines (70 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
71
72
73
74
75
# docker-compose.yml
version: "3"
services:
postgres:
image: "postgres:alpine" # use latest official postgres version
#name: "postgres-ca"
networks:
- canet
ports:
- "127.0.0.1:5432:5432/tcp"
env_file:
- database.env # configure postgres
volumes:
- db_data:/var/lib/postgresql/data/ # persist data even if container shuts down
- ./create_dbs.sh:/docker-entrypoint-initdb.d/create_dbs.sh
restart: unless-stopped
redis:
image: "redis:alpine" # default version of Ubuntu 20.02, apt-cache show redis-server
restart: on-failure
networks:
- canet
ports:
- 127.0.0.1:6379:6379/tcp
restart: unless-stopped
nginx:
build:
context: ./nginx
#name: lemur-nginx
networks:
- canet
volumes:
- ca_data:/opt/lemur/lemur/static/dist:ro
#- /etc/nginx/:/etc/nginx/
restart: on-failure
depends_on:
- lemur
ports:
- 80:80
- 443:443
restart: unless-stopped
lemur:
image: netlix-lemur:latest
build:
context: ./lemur-build-docker
#name: lemur
restart: on-failure
networks:
canet:
ipv4_address: 192.168.48.4
depends_on:
- postgres
- redis
env_file:
- lemur.env
- lemur_db.env
volumes:
- ./lemur_keys:/home/lemur/.lemur/lemur_keys:ro
- ./lemur.conf.py:/home/lemur/.lemur/lemur.conf.py:ro
- ca_data:/opt/lemur/lemur/static/dist:ro
restart: unless-stopped
volumes:
db_data: # named volumes can be managed easier using docker-compose
ca_data:
networks:
canet:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.48.0/29