-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·74 lines (68 loc) · 1.51 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
version: "3.8"
volumes:
app_files:
driver: local
driver_opts:
type: none
device: ${PWD}/www
o: bind
networks:
default:
name: ${APP_NAME}-network
driver: bridge
services:
nginx:
image: nginx:alpine
container_name: ${APP_NAME}-nginx
restart: always
ports:
- 80:80
volumes:
- app_files:/var/www
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./docker/nginx/logs:/var/log/nginx
depends_on:
- php-fpm
networks:
- default
php-fpm:
build: ./docker/php
image: ${APP_NAME}-php
container_name: ${APP_NAME}-php
restart: always
ports:
- 9000:9000
volumes:
- app_files:/var/www
networks:
- default
mariadb:
image: mariadb
container_name: ${APP_NAME}-mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASS}
MYSQL_DATABASE: ${DB_NAME}
ports:
- 3306:3306
volumes:
- ./docker/mariadb/dump:/docker-entrypoint-initdb.d
- ./docker/mariadb/data:/var/lib/mysql
networks:
- default
dbadmin:
image: phpmyadmin/phpmyadmin
container_name: ${APP_NAME}-dbadmin
restart: always
environment:
PMA_HOST: mariadb
PMA_USER: root
PMA_PASSWORD: ${DB_ROOT_PASS}
ports:
- 8080:80
depends_on:
- mariadb
networks:
- default