-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
116 lines (109 loc) · 2.98 KB
/
docker-compose.yml
File metadata and controls
116 lines (109 loc) · 2.98 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
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'
networks:
proxy:
internal:
internal: true
volumes:
mongodata:
services:
nginx:
image: jwilder/nginx-proxy:1.0-alpine
container_name: nginx
restart: always
tty: true
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: 'true'
ports:
- 80:80
- 443:443
volumes:
- ./app/proxy/logs/global:/var/log/nginx
- ./app/proxy/conf/:/etc/nginx/conf.d/
- ./app/proxy/vhost:/etc/nginx/vhost.d
- ./app/proxy/passwd:/etc/nginx/htpasswd
- ./app/proxy/data/html:/usr/share/nginx/html
- ./app/proxy/data/certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion:2.2
container_name: letsencrypt
tty: true
volumes:
- ./app/proxy/vhost:/etc/nginx/vhost.d
- ./app/proxy/data/html:/usr/share/nginx/html
- ./app/proxy/data/certs:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
- nginx
networks:
- proxy
builder:
build:
context: ./app
dockerfile: Dockerfile.build
container_name: prescrisur_builder
restart: on-failure:3
networks:
- proxy
volumes:
- ./app/front:/home/app/front
main:
build:
context: ./app
dockerfile: Dockerfile.app
container_name: prescrisur
tty: true
restart: always
#depends_on:
# - db:
# condition: "service_healthy"
# - builder:
# condition: "service_completed_successfully"
networks:
- proxy
- internal
expose:
- 8080
healthcheck:
test: exit $$( curl -so /dev/null --fail http://127.0.0.1:8080 && echo 0 || echo 1 )
interval: 30s
timeout: 1s
retries: 1
volumes:
- ./app/api:/home/app/api:ro
- ./app/log:/home/app/logs:rw
- ./app/front/src:/home/api/front:ro
environment:
DB_NAME: Prescrisur
APP_URL: www.prescrisur.fr
LOG_DIR: /home/app/logs
DEFAULT_RECIPIENT_EMAIL: contact@prescrisur.fr
VIRTUAL_HOST: www.prescrisur.fr, prescrisur.fr
VIRTUAL_PORT: 8080
LETSENCRYPT_HOST: www.prescrisur.fr, prescrisur.fr
LETSENCRYPT_EMAIL: pierrick.boutruche@gmail.com
db:
image: mongo:5.0.6
container_name: prescrisur_db
restart: always
# depends_on:
#- builder:
# condition: "service_completed_successfully"
networks:
- internal
expose:
- 27017
healthcheck:
test: mongo --eval 'db.runCommand("ping").ok' localhost:27017/test --quiet
interval: 30s
timeout: 1s
retries: 1
environment:
MONGO_INITDB_ROOT_USERNAME:
MONGO_INITDB_ROOT_PASSWORD:
MONGO_INITDB_DATABASE: Prescrisur
volumes:
- ./app/db/mongo-setup.js:/docker-entrypoint-initdb.d/mongo-setup.js:ro
- mongodata:/data/db