forked from ddlibrary/ddlibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
57 lines (54 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
47
48
49
50
51
52
53
54
55
56
57
version: "3.7"
networks:
ddlmain-network:
volumes:
dbdata:
driver: local
services:
web:
image: nginx:stable-alpine
container_name: web
volumes:
- ./public:/var/www/html/public
- ./storage/logs/:/var/log/nginx
- ./docker/nginx/conf.d/ddlmain.local.conf:/etc/nginx/conf.d/default.conf
depends_on:
- app
restart: unless-stopped
ports:
- "8080:80"
networks:
- ddlmain-network
db:
image: mysql:5.7
container_name: db
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_USER: ${DB_USERNAME}
volumes:
- ./docker/mysql/db.cnf:/etc/mysql/conf.d/my.cnf
- dbdata:/var/lib/mysql
tty: true
ports:
- "3306:3306"
networks:
- ddlmain-network
app:
build:
args:
PHP_VERSION: ${PHP_VERSION}
context: .
dockerfile: local.Dockerfile
container_name: app
env_file:
- '.env'
volumes:
- ./:/var/www/html
- ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
restart: unless-stopped
ports:
- "9000:9000"
networks:
- ddlmain-network