-
Notifications
You must be signed in to change notification settings - Fork 101
/
docker-compose.yml
executable file
·100 lines (93 loc) · 1.96 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
version: "3.8"
services:
nginx:
container_name: nginx
image: nginx:stable
networks:
- internal
volumes:
- ./nginx/image-files/etc/nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- mysql
- api
- frontend
- backend
- memcached
ports:
- 80:80
api:
container_name: api
build:
context: ./api
depends_on:
- mysql
networks:
- internal
environment:
- COOKIE_VALIDATION_KEY=K0I9yOJPLBqbaam4I
- PHP_ENABLE_XDEBUG=0
- YII_ENV_DEV=1
- MYSQL_HOST=mysql
- MYSQL_PORT=3306
- MYSQL_DATABASE=boilerplate
- MYSQL_USERNAME=root
- MYSQL_PASSWORD=root
- CACHE_USE_MEMCACHED=true
- CACHE_SERVERS=memcached
- CACHE_PORT=11211
- CACHE_WEIGHT=60
- CACHE_USERNAME=
- CACHE_PASSWORD=
volumes:
- ./api:/srv
backend:
container_name: backend
build:
context: ./backend
dockerfile: ./Dockerfile
target: build-stage
depends_on:
- api
networks:
- internal
command: ["docker-entrypoint-dev.sh"]
volumes:
- ./backend/src:/app/src
frontend:
container_name: frontend
build:
context: ./frontend
dockerfile: ./Dockerfile
target: build-stage
depends_on:
- api
networks:
- internal
command: ["docker-entrypoint-dev.sh"]
volumes:
- ./frontend/src:/app/src
memcached:
container_name: memcached
image: memcached:latest
networks:
- internal
mysql:
container_name: mysql
image: mysql:8.0
networks:
- internal
ports:
- 3308:3306
volumes:
- ./mysql/conf.d:/etc/mysql/conf.d
- mysql_data:/var/lib/mysql
command: --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=boilerplate
- TZ=Australia/Melbourne
networks:
internal:
driver: bridge
volumes:
mysql_data: