forked from antonino-tocco/hbp-backend-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
90 lines (86 loc) · 2.15 KB
/
docker-compose.yml
File metadata and controls
90 lines (86 loc) · 2.15 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
version: '3.9'
services:
hbp_es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
container_name: hbp_es01
environment:
- node.name=es01
- discovery.type=single-node
- bootstrap.memory_lock=true
- network.host=0.0.0.0
- ES_JAVA_OPTS=-Xmx256m -Xms256m
volumes:
- data01:/usr/app/data01
expose:
- 9200
ulimits:
memlock:
soft: -1
hard: -1
logging:
driver: "none"
# kib01:
# image: docker.elastic.co/kibana/kibana:7.8.1
# container_name: kib01
# depends_on:
# - es01
# ports:
# - 17896:5601
# environment:
# ELASTICSEARCH_URL: http://es01:9200
# ELASTICSEARCH_HOSTS: http://es01:9200
# logging:
# driver: "none"
hbp_backend:
build: .
container_name: hbp_backend
restart: on-failure
environment:
- ELASTIC_SEARCH_URL=http://hbp_es01:9200
- WAIT_COMMAND=[ $$(curl --write-out %{http_code} --silent --output /dev/null http://hbp_es01:9200/_cat/health?h=st) = 200 ]
- WAIT_START_CMD=uwsgi uwsgi.ini --enable-threads
- WAIT_SLEEP=10
- WAIT_LOOPS=50
env_file:
- backend.env
ports:
- 17895:5000
depends_on:
- hbp_es01
links:
- hbp_es01
nginx:
image: nginx:1.15-alpine
container_name: nginx
ports:
- 80:80
- 443:443
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
volumes:
- ./data/nginx:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
depends_on:
- hbp_backend
links:
- hbp_backend
certbot:
image: certbot/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
depends_on:
- nginx
volumes:
data01:
driver: local
driver_opts:
type: none
o: bind
device: /mnt/facility-hub-storage
networks:
default:
driver: bridge
driver_opts:
com.docker.network.driver.mtu: 1450