File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ services :
2+
3+ # Php, nginx service
4+ app :
5+ tty : true
6+ container_name : app_host
7+ restart : always
8+ build :
9+ context : .
10+ target : php
11+ dockerfile : ./Dockerfile
12+ working_dir : /var/www # bash root
13+ ports :
14+ - 8000:80
15+ networks :
16+ - internal
17+ depends_on :
18+ - mysql
19+ volumes :
20+ - ./logs/nginx:/var/log/nginx/
21+ - ./logs/php:/var/log/fpm-php.www.log
22+ - myapp:/home/test/myapp
23+
24+ # Database service
25+ mysql :
26+ tty : true
27+ container_name : mysql_host
28+ image : mariadb
29+ ports :
30+ - 7000:3306
31+ restart : unless-stopped
32+ environment :
33+ - MARIADB_ALLOW_EMPTY_PASSWORD=${DB_ALLOW_EMPTY_PASSWORD}
34+ - MARIADB_DATABASE=${DB_DATABASE}
35+ - MARIADB_ROOT_PASSWORD=${DB_PASSWORD}
36+ networks :
37+ - internal
38+ # volumes:
39+ # - ./mysql:/docker-entrypoint-initdb.d/
40+ # - db-data:/var/lib/mysql
41+
42+ # Docker volumes
43+ volumes :
44+ # Storage
45+ myapp :
46+ # Db data
47+ db-data :
48+ driver : local
49+ driver_opts :
50+ device : ./volume/mysql
51+ type : none
52+ o : bind
53+ # Or
54+ # db-data: ~
55+
56+ networks :
57+ internal :
58+ driver : bridge
You can’t perform that action at this time.
0 commit comments