-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
91 lines (82 loc) · 1.98 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: "3.8"
services:
# web-client:
# build: ./client/
# networks:
# - frontend
# volumes:
# # - ./docker/www/www.loconnected.com:/app/dist
# # - ./docker/www/www.loconnected.com:/app
# tty: true
# web-admin:
# build: ./admin/
# networks:
# - frontend
# volumes:
# # - ./docker/www/admin.loconnected.com:/app/dist
# tty: true
db:
image: mariadb
restart: always
networks:
- backend
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: admin
MYSQL_PASSWORD: admin
MYSQL_DATABASE: test
volumes:
- ./docker/database:/var/lib/mysql
adminer:
image: adminer
restart: always
networks:
- backend
depends_on:
- db
environment:
ADMINER_DEFAULT_DB_DRIVER: mysql
ADMINER_DEFAULT_DB_HOST: db
ADMINER_DEFAULT_DB_NAME: adminer
ADMINER_DESIGN: nette
ADMINER_PLUGINS: tables-filter tinymce
node-api:
build: ./server/
image: node-api
restart: unless-stopped
stdin_open: true # docker run -i
tty: true # docker run -t
networks:
- backend
depends_on:
- db
nginx:
image: nginx:mainline-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./docker/nginx:/etc/nginx
- ./docker/www:/var/www:ro
- ./docker/certbot/conf:/etc/letsencrypt
#- ./docker/certbot/www:/var/www/certbot
depends_on:
- node-api
- adminer
networks:
- backend
# - frontend
command: '/bin/sh -c ''while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'''
certbot:
image: certbot/certbot
restart: unless-stopped
volumes:
- ./docker/certbot/conf:/etc/letsencrypt
- ./docker/www/certbot:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
# frontend:
# driver: bridge
backend:
driver: bridge