-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
74 lines (69 loc) · 1.45 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
version: '3'
services:
mysql:
container_name: mysql
image: mysql/mysql-server:latest
environment:
MYSQL_ROOT_PASSWORD: root_pw
MYSQL_DATABASE: PickRapDB
MYSQL_USER: admin
MYSQL_PASSWORD: vlzmfoq1!
command:
- --default-authentication-plugin=mysql_native_password
ports:
- "3305:3306"
networks:
- db_network
restart: always
redis:
container_name: redis
image: redis:latest
ports:
- "6378:6379"
networks:
- db_network
restart: always
## deploy
nginx:
image: nginx:1.15-alpine
container_name: nginx-container
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx:/etc/nginx/conf.d
- /etc/letsencrypt:/etc/letsencrypt
- /var/log/nginx/pickrap:/var/log/nginx/pickrap
command:
"/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
networks:
- backbone
green:
build: .
image: green
container_name: green
restart: always
ports:
- "8081:8080"
volumes:
- ./:/home/ubuntu
- /etc/localtime:/etc/localtime
networks:
- backbone
blue:
build: .
container_name: blue
restart: always
ports:
- "8082:8080"
volumes:
- ./:/home/ubuntu
- /etc/localtime:/etc/localtime
networks:
- backbone
networks:
db_network:
driver: bridge
backbone:
driver: bridge