-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
77 lines (72 loc) · 1.72 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
services:
# Php, nginx service
app:
tty: true
container_name: app_host
restart: unless-stopped
build:
context: .
target: php
dockerfile: ./Dockerfile
working_dir: /var/www # bash root
ports:
- 8000:80
networks:
- internal
depends_on:
- mysql
volumes:
- ./logs/nginx:/var/log/nginx/
- ./logs/php:/var/log/fpm-php.www.log
# - ./logs/supervisor:/var/log/supervisor/supervisord.log
# - myapp:/home/test/myapp
# Database service
mysql:
tty: true
container_name: mysql_host
image: mysql:8.0
ports:
- 7000:3306
restart: unless-stopped
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=${DB_ALLOW_EMPTY_PASSWORD}
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
networks:
- internal
# volumes:
# - ./mysql:/docker-entrypoint-initdb.d/
# - db-data:/var/lib/mysql
# Database service
# mariadb:
# tty: true
# container_name: mysql_host
# image: mariadb
# ports:
# - 7000:3306
# restart: unless-stopped
# environment:
# - MARIADB_ALLOW_EMPTY_PASSWORD=${DB_ALLOW_EMPTY_PASSWORD}
# - MARIADB_DATABASE=${DB_DATABASE}
# - MARIADB_ROOT_PASSWORD=${DB_PASSWORD}
# networks:
# - internal
# # volumes:
# # - ./mysql:/docker-entrypoint-initdb.d/
# # - db-data:/var/lib/mysql
# Docker volumes
volumes:
# Storage
myapp:
# Db data
db-data:
driver: local
driver_opts:
device: ./volume/mysql
type: none
o: bind
# Or
# db-data: ~
networks:
internal:
driver: bridge