-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.prod.yml
70 lines (67 loc) · 1.39 KB
/
docker-compose.prod.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
version: '3.5'
services:
database:
container_name: database
image: mysql:5.7
restart: always
environment:
MYSQL_USER: username
MYSQL_PASSWORD: password
MYSQL_DATABASE: BnBDb
MYSQL_ROOT_PASSWORD: root
ports:
- "3306:3306"
expose:
- "3306"
volumes:
- database:/var/lib/mysql
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
environment:
PMA_HOST: database
MYSQL_USER: username
MYSQL_PASSWORD: password
ports:
- 9000:80
depends_on:
- database
redis:
container_name: redis
image: redis:4.0.5-alpine
restart: always
command: ["redis-server", "--appendonly", "yes"]
ports:
- "6379:6379"
volumes:
- redis-data:/data
backend:
image: sondh0127/bnb_backend:latest
environment:
FLASK_ENV: production
FLASK_APP: bnbgotit.py
FLASK_DEBUG: 0
restart: always
ports:
- "5000:5000"
expose:
- '5000'
depends_on:
- database
frontend:
image: sondh0127/bnb_frontend:latest
restart: always
deploy:
replicas: 2
depends_on:
- backend
environment:
NODE_ENV: production
ports:
- '3000:3000'
expose:
- '3000'
volumes:
database:
redis-data: