-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.dev.yml
79 lines (76 loc) · 1.65 KB
/
docker-compose.dev.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
version: '3'
services:
#PHP Service
app:
build:
context: .
dockerfile: ./.docker/dev/app/Dockerfile
user: "www-data:www-data"
container_name: app
restart: unless-stopped
tty: true
environment:
SERVICE_NAME: app
SERVICE_TAGS: dev
working_dir: /var/www
volumes:
- ./:/var/www
- ./.docker/dev/app/php.ini:/usr/local/etc/php/conf.d/local.ini
networks:
- app-network
#Nginx Service
webserver:
image: nginx:alpine
container_name: webserver
restart: unless-stopped
tty: true
ports:
- "80:80"
- "443:443"
volumes:
- ./:/var/www
- ./.docker/dev/webserver/nginx:/etc/nginx/conf.d/
networks:
- app-network
#command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
#MySQL Service
db:
image: mysql:8.0
container_name: db
restart: unless-stopped
tty: true
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
SERVICE_TAGS: dev
SERVICE_NAME: mysql
volumes:
- ./.docker/dev/db/dbdata:/var/lib/mysql/
- ./.docker/dev/db/mysql/my.cnf:/etc/mysql/my.cnf
networks:
- app-network
command:
- --sort_buffer_size=1073741824
myadmin:
image: 'phpmyadmin:latest'
ports:
- 8080:80
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
PMA_HOST: mysql
links:
- "db:mysql"
depends_on:
- db
networks:
- app-network
#Docker Networks
networks:
app-network:
driver: bridge
#Volumes
volumes:
dbdata:
driver: local