-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
60 lines (57 loc) · 1.6 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
version: "3"
services:
mysql:
image: mysql:latest
volumes:
- ./data/mysql:/var/lib/mysql
- ./conf/mysql/my.cnf:/etc/mysql/my.cnf
networks:
- mysql
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=root # change to your password!
command: --default-authentication-plugin=mysql_native_password
redis:
image: redis:latest
volumes:
- ./data/redis:/data
- ./conf/redis/redis.conf:/etc/redis/redis.conf
networks:
- mysql
ports:
- "6379:6379"
sysctls:
- net.core.somaxconn=1024
command: >
bash -c "echo 'vm.overcommit_memory = 1' >> /etc/sysctl.conf
&& redis-server /etc/redis/redis.conf --appendonly yes"
php-fpm73:
build:
context: .
dockerfile: dockerfiles/Dockerfile.php73
volumes:
- ../project:/var/www/html
- ./conf/php:/usr/local/etc/php
- ./conf/supervisor:/etc/supervisor/conf.d
networks:
- mysql
- nginx
ports:
- "9000:9000"
nginx:
image: nginx:alpine
volumes:
- ../project:/var/www/html
- ./conf/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./conf/nginx/conf.d:/etc/nginx/conf.d:ro
- ./log/nginx:/var/log/nignx
- ./ssl:/etc/nginx/ssl
networks:
- nginx
ports:
- "80:80"
- "443:443"
networks:
mysql:
nginx: