-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yaml
executable file
·69 lines (63 loc) · 1.29 KB
/
docker-compose.yaml
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
version: '3'
services:
app:
build:
context: .
args:
user: user
uid: 1000
container_name: app
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
entrypoint: dockerize -template ./.docker/app/.env:.env -wait tcp://db:3306 -timeout 40s ./.docker/entrypoint.sh
environment:
- _DB_HOST=db
- _DB_DATABASE=appdb
- _DB_USERNAME=root
- _DB_PASSWORD=root
- _REDIS_HOST=redis
- PHP_IDE_CONFIG=serverName=XdebugServer
volumes:
- .:/var/www
networks:
- app-network
depends_on:
- db
- redis
nginx:
build: .docker/nginx
container_name: nginx
restart: unless-stopped
tty: true
ports:
- "8000:80"
volumes:
- .:/var/www
networks:
- app-network
depends_on:
- app
db:
build: ./.docker/mysql
container_name: db
restart: unless-stopped
tty: true
ports:
- "33006:3306"
volumes:
- ./.docker/dbdata:/var/lib/mysql
environment:
- MYSQL_DATABASE=appdb
- MYSQL_ROOT_PASSWORD=root
- MYSQL_ROOT_USER=root
networks:
- app-network
redis:
image: redis:latest
container_name: redis
networks:
- app-network
networks:
app-network:
driver: bridge