-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
77 lines (74 loc) · 1.43 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
version: "3.7"
services:
app:
build:
context: docker/app
dockerfile: Dockerfile
image: laravelapp/app:latest
command: ["--env=dev"]
healthcheck:
test: ["CMD", "curl", "-f", "${APP_URL}"]
interval: 30s
timeout: 2s
retries: 3
start_period: 30s
networks:
- appnet
env_file:
- .env
volumes:
- .:/var/www/html
ports:
- 80:80
- 443:443
working_dir: /var/www/html/
depends_on:
- mysql
- redis
node:
build:
context: docker/node
dockerfile: Dockerfile
image: laravelapp/node:latest
command: ["--env=dev"]
networks:
- appnet
environment:
- NODE_ENV=development
volumes:
- .:/home/node/app
working_dir: /home/node/app
mysql:
image: mysql:5.7
env_file:
- .env
environment:
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
MYSQL_DATABASE: "${DB_DATABASE}"
MYSQL_USER: "${DB_USERNAME}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
ports:
- ${DB_PORT}:3306
networks:
- appnet
volumes:
- app-data:/var/lib/mysql
redis:
image: redis:5.0.7
command: redis-server --appendonly yes
env_file:
- .env
ports:
- ${REDIS_PORT}:${REDIS_PORT}
networks:
- appnet
volumes:
- redis-data:/data
networks:
appnet:
driver: bridge
volumes:
app-data:
driver: local
redis-data:
driver: local