-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
42 lines (42 loc) · 936 Bytes
/
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
version: '3.8'
services:
nginx:
build:
context: docker/nginx
args:
USER: ${USER}
GROUP: ${GROUP}
ports:
- ${NGINX_PORT}:${NGINX_PORT}
environment:
NGINX_PORT: ${NGINX_PORT}
APP_PHP_SERVICE_NAME: ${APP_PHP_SERVICE_NAME}
APP_PHP_PORT: ${APP_PHP_PORT}
volumes:
- ./src:/var/www/html
depends_on:
- mysql
- ${APP_PHP_SERVICE_NAME}
mysql:
image: mysql:latest
ports:
- ${MYSQL_PORT}:${MYSQL_PORT}
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
volumes:
- database:/var/lib/mysql
app:
build:
context: docker/php
args:
USER: ${USER}
GROUP: ${GROUP}
ports:
- ${APP_PHP_PORT}:${APP_PHP_PORT}
volumes:
- ./src:/var/www/html
volumes:
database: