-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
46 lines (44 loc) · 997 Bytes
/
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
services:
#nginx
nginx:
image: nginx:latest
ports:
- "8000:80"
volumes:
- ./app:/var/www/html
- ./docker/nginx/conf.d:/etc/nginx/conf.d
restart: unless-stopped
depends_on:
- app
#php
app:
build:
dockerfile: ./docker/php/Dockerfile
environment:
MYSQL_HOST: mysql
MYSQL_PORT: ${MYSQL_PORT}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
APP_ENV: ${APP_ENV}
volumes:
- ./app:/var/www/html
restart: unless-stopped
depends_on:
- mysql
#mysql
mysql:
image: mysql:8.0
ports:
- "3306:3306"
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
volumes:
- mysql-data:/var/lib/mysql
volumes:
mysql-data: