-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
75 lines (72 loc) · 1.86 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
version: '3'
services:
php:
# image: 'php:7.4-fpm'
build:
context: ./config/php
dockerfile: php.Dockerfile
container_name: ${APP_NAME:?err}-php
environment:
- 'TZ=${WORKSPACE_TIMEZONE}'
- 'DBUP=${MARIADB_DATABASE}'
- 'USERDB=${MARIADB_USER}'
- 'UPWDB=${MARIADB_PASSWORD}'
volumes:
- ./config/php/php.ini:/usr/local/etc/php/php.ini
- ./app:/var/www/html
depends_on:
- mariadb
nginx:
#image: nginx:latest
build:
context: ./config/nginx
dockerfile: nginx.Dockerfile
container_name: ${APP_NAME:?err}-nginx
restart: 'on-failure'
ports:
- '8081:80'
- '443:443'
links:
- php
environment:
- 'TZ=${WORKSPACE_TIMEZONE}'
volumes:
- ./app:/var/www/html
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./config/nginx/sites:/etc/nginx/conf.d
mariadb:
# image: mariadb:latest
build:
context: ./config/mariadb
dockerfile: mariadb.Dockerfile
args:
- http_proxy
- https_proxy
- no_proxy
container_name: ${APP_NAME:?err}-mariadb
# restart: 'on-failure'
environment:
- 'TZ=${WORKSPACE_TIMEZONE}'
- 'DBUP=${MARIADB_DATABASE}'
- 'USERDB=${MARIADB_USER}'
- 'UPWDB=${MARIADB_PASSWORD}'
- 'MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}'
volumes:
- ${DATA_PATH_HOST}/setup.sh:/docker-entrypoint-initdb.d/setup.sh
- ${DATA_PATH_HOST}/mariadb:/var/lib/mysql
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u root --password=$$MARIADB_ROOT_PASSWORD
interval: 5s
retries: 10
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: ${APP_NAME:?err}-phpmyadm
ports:
- ${PMA_PPORT}:80
links:
- mariadb
- php
environment:
PMA_HOST: mariadb
depends_on:
- mariadb