-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
74 lines (68 loc) · 1.23 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
version: '3.7'
# Networks
networks:
# Internal network
internal:
driver: bridge
# Volumes
volumes:
# MySQL volume
mysql_data:
driver: local
# Redis volume
redis_data:
driver: local
# Services
services:
# MySQL
mysql:
image: mysql:5.7
container_name: mysql
networks:
- internal
volumes:
- .:/var/www/app
- mysql_data:/var/lib/mysql
working_dir: /var/www/app
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=database
- MYSQL_USER=user
- MYSQL_PASSWORD=pass
ports:
- "3306:3306"
# Nginx
nginx:
image: webdevops/php-nginx:8.3
container_name: nginx
networks:
- internal
depends_on:
- mysql
- redis
links:
- mysql
- redis
volumes:
- .:/var/www/app
working_dir: /var/www/app
environment:
- WEB_DOCUMENT_ROOT=/var/www/app/public
- PHP_DATE_TIMEZONE=UTC
- PHP_DISPLAY_ERRORS=0
- WEB_DOCUMENT_INDEX=index.php
expose:
- 9090
ports:
- "8080:80"
# Redis
redis:
image: redis:6
container_name: redis
command: --append only yes
networks:
- internal
volumes:
- redis_data:/data
ports:
- "6379:6379"