-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (56 loc) · 1.25 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
version: '3'
services:
db:
image: mysql:5.7
command: --default-authentication-plugin=mysql_native_password
container_name: db
restart: unless-stopped
env_file: .env
environment:
MYSQL_DATABASE: $DB_NAME
MYSQL_ROOT_PASSWORD: $DB_PASSWORD
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
ports:
- '3306:3306'
volumes:
- db_data:/var/lib/mysql
networks:
- app-network
nodejs:
image: verberden/guess-number:v1
container_name: nodejs
restart: unless-stopped
env_file: .env
environment:
DB_HOST: $DB_HOST
DB_PORT: $DB_PORT
DB_NAME: $DB_NAME
DB_USER: $DB_USER
DB_PASSWORD: $DB_PASSWORD
volumes:
- .:/home/node/app
- node_modules:/home/node/app/node_modules
depends_on:
- db
networks:
- app-network
webserver:
image: nginx:mainline-alpine
container_name: webserver
restart: unless-stopped
ports:
- "80:80"
volumes:
- web-root:/var/www/html
- ./nginx-conf:/etc/nginx/conf.d
depends_on:
- nodejs
networks:
- app-network
volumes:
db_data: { }
web-root:
node_modules:
networks:
app-network:
driver: bridge