-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (71 loc) · 1.29 KB
/
docker-compose.yml
File metadata and controls
77 lines (71 loc) · 1.29 KB
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"
services:
nginx:
image: nginx:alpine
command: nginx -g "daemon off;"
links:
- laravel
ports:
- "8080:80"
working_dir: /var/www
volumes:
- ./:/var/www
- ./scripts/nginx/:/etc/nginx/conf.d/
networks:
- hostnet
laravel:
build:
context: .
dockerfile: Dockerfile.api
depends_on:
- mysql
- redis
working_dir: /var/www/
ports:
- "9000:9000"
volumes:
- ./:/var/www/
environment:
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: kavan
DB_USERNAME: root
DB_PASSWORD: secret
REDIS_HOST: redis
CACHE_DRIVER: redis
networks:
- hostnet
mysql:
image: mysql:5.7.22
restart: unless-stopped
tty: true
ports:
- "3307:3306"
environment:
MYSQL_DATABASE: kavan
MYSQL_ROOT_PASSWORD: secret
SERVICE_TAGS: dev
SERVICE_NAME: mysql
volumes:
- dbdata:/var/lib/mysql/
- ./scripts/mysql/my.cnf:/etc/mysql/my.cnf
networks:
- hostnet
redis:
image: redis:5-alpine
ports:
- "6382:6379"
volumes:
- redis:/data
networks:
- hostnet
#Network
networks:
hostnet:
driver: bridge
#Volumes
volumes:
dbdata:
driver: local
redis:
driver: local