-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (42 loc) · 1.19 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
version: '3'
services:
nginx:
build:
context: "./docker/nginx"
container_name: ${APP_CODE_CONTAINER_PREFIX}-nginx
restart: always
depends_on:
- php-fpm
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
networks:
- backend
php-fpm:
build:
context: "./docker/php-fpm"
container_name: ${APP_CODE_CONTAINER_PREFIX}-php-fpm
restart: always
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
networks:
- backend
expose:
- "9000"
mysql:
build:
context: "./docker/mysql"
container_name: ${APP_CODE_CONTAINER_PREFIX}-mysql
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
volumes:
- ./docker/mysql/data:/var/lib/mysql
ports:
- ${DB_PORT}:3306
networks:
- backend
networks:
backend:
driver: bridge