-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
109 lines (106 loc) · 2.88 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
networks:
netlfs:
name: netlfsys
ipam:
config:
- subnet: 10.10.0.0/24
services:
nginx:
#image: lfsys/nginx:latest
build:
context: ./config/nginx
args:
- "ARCH_TYPE=${ARCH_TYPE}"
- "USR_ID=${USR}"
- "GRP_ID=${GRP}"
- "TZ=${WORKSPACE_TIMEZONE}"
dockerfile: ngx.Dockerfile
container_name: ${APP_NAME:?err}-nginx
hostname: contnr_nginx
restart: "unless-stopped"
ports:
- "80:80"
- "443:443"
- ${NGXUI_PORT}:81
- ${PMA_PORT}:9980
- ${PMASSL_PORT}:9443
networks:
netlfs:
ipv4_address: 10.10.0.101
links:
- php
environment:
- "TZ=${WORKSPACE_TIMEZONE}"
- "PMAP=${PMA_PORT}"
- "PMAPS=${PMASSL_PORT}"
- "NGXUI=${NGXUI_PORT}"
- "DBUP=${MARIADB_DATABASE}"
- "USERDB=${MARIADB_USER}"
- "UPWDB=${MARIADB_PASSWORD}"
volumes:
- ./app:/var/www/html
- ${DATA_PATH_HOST}/nginx-ui:/etc/nginx-ui
- ${DATA_PATH_HOST}/nginx:/etc/nginx
depends_on:
- mariadb
php:
#image: lfsys/php:latest
# or
#image: lfsys/php74:latest
build:
context: ./config/php
args:
- "VPHP=${VERSION_PHP}"
- "USR_ID=${USR}"
- "GRP_ID=${GRP}"
- "TZ=${WORKSPACE_TIMEZONE}"
#dockerfile: php74.Dockerfile
dockerfile: php.Dockerfile
container_name: ${APP_NAME:?err}-php
hostname: contnr_php
restart: "unless-stopped"
#ports:
# - "9001:9001"
networks:
netlfs:
ipv4_address: 10.10.0.102
environment:
- "TZ=${WORKSPACE_TIMEZONE}"
- "DBUP=${MARIADB_DATABASE}"
- "USERDB=${MARIADB_USER}"
- "UPWDB=${MARIADB_PASSWORD}"
volumes:
- ./app:/var/www/html
- ./config/php/php.ini:/etc/php${VERSION_PHP}/php.ini
- ./config/php/www.conf:/etc/php${VERSION_PHP}/php-fpm.d/www.conf
# If you need xdebug you can uncomment the line below.
#- ./config/php/50_xdebug.ini:/etc/php${VERSION_PHP}/conf.d/50_xdebug.ini
depends_on:
- mariadb
mariadb:
image: mariadb:latest
container_name: ${APP_NAME:?err}-mariadb
hostname: contnr_db
user: "${USR}:${GRP}"
restart: "unless-stopped"
ports:
- "3306:3306"
networks:
netlfs:
ipv4_address: 10.10.0.103
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
- ./config/mariadb/my.cnf:/etc/mysql/conf.d/my.cnf
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
healthcheck:
test: mariadb-admin ping -h 127.0.0.1 -u root --password=$$MARIADB_ROOT_PASSWORD
interval: 5s
retries: 10