-
Notifications
You must be signed in to change notification settings - Fork 35
/
docker-compose.yml
95 lines (87 loc) · 1.97 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
92
93
94
95
version: '3'
services:
# Application - REST API 8.0
application-8.0:
build: docker/8.0
container_name: rest-api-app-8.0
restart: unless-stopped
tty: true
working_dir: /var/www
depends_on:
- nginx-8.0
- redis
- mysql
volumes:
- ./:/var/www
- ./storage/config/extra.ini:/usr/local/etc/php/conf.d/extra.ini
networks:
- rest-api-network
# Application - REST API 8.1
application-8.1:
build: docker/8.1
container_name: rest-api-app-8.1
restart: unless-stopped
tty: true
working_dir: /var/www
depends_on:
- nginx-8.1
- redis
- mysql
volumes:
- ./:/var/www
- ./storage/config/extra.ini:/usr/local/etc/php/conf.d/extra.ini
networks:
- rest-api-network
# Webserver - nginX 8.0
nginx-8.0:
image: nginx:alpine
container_name: rest-api-nginx-8.0
restart: unless-stopped
tty: true
volumes:
- ./:/var/www
- ./storage/config/nginx/8.0/:/etc/nginx/conf.d/
networks:
- rest-api-network
# Webserver - nginX 8.0
nginx-8.1:
image: nginx:alpine
container_name: rest-api-nginx-8.1
restart: unless-stopped
tty: true
volumes:
- ./:/var/www
- ./storage/config/nginx/8.1/:/etc/nginx/conf.d/
networks:
- rest-api-network
# Database - Mysql
mysql:
image: mysql:5.7.22
container_name: rest-api-mysql
restart: unless-stopped
tty: true
environment:
- MYSQL_ROOT_PASSWORD=secret
- MYSQL_USER=phalcon
- MYSQL_DATABASE=phalcon_api
- MYSQL_PASSWORD=secret
volumes:
- rest-api-volume:/var/lib/mysql/
- ./storage/config/my.cnf:/etc/mysql/my.cnf
networks:
- rest-api-network
# Cache - Redis
redis:
container_name: rest-api-cache
image: redis:5-alpine
restart: "always"
networks:
- rest-api-network
# Network
networks:
rest-api-network:
driver: bridge
# Volumes
volumes:
rest-api-volume:
driver: local