-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
77 lines (69 loc) · 1.89 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
version: "3.8"
name: ${APP_NAME}
services:
# PHP APPS
php_app:
container_name: ${APP_NAME}
image: ${APP_NAME}/php
build:
context: .
dockerfile: ./dockerfiles/Dockerfile
args:
- COMPOSER_VERSION=latest
- XDEBUG_VERSION=latest
volumes:
- "php_app:/var/www/html"
- "./logs/xdebug:/var/log/xdebug"
- "./ssl/ca/ca.crt:/usr/local/share/cert_install/ca.crt"
- "./volumes/www-home:/home/www-data"
# Uncomment for ssh These files will be copied upon
# - "./conf/ssh/config:/home/www-data/.ssh_settings/config"
# Replace ssh keys here
# - "~/.ssh/pc_magas.pub:/home/www-data/.ssh_settings/pc_magas.pub"
# - "~/.ssh/pc_magas:/home/www-data/.ssh_settings/pc_magas"
networks:
private:
env_file: env/php.env
# Supportive services
nginx:
container_name: ${APP_NAME}-nginx
image: nginx
networks:
private:
public:
ipv4_address: ${IP_BASE}.2
volumes:
- "php_app:/var/www/html"
- "./conf/nginx/nginx.conf:/etc/nginx/nginx.conf:ro"
- "./ssl/certs/www.crt:/etc/nginx/ssl/www.crt:ro"
- "./ssl/certs/www.key:/etc/nginx/ssl/www.key:ro"
mariadb:
# Replace with your own
image: mariadb:10.4
container_name: ${APP_NAME}-mariadb
command:
--max_allowed_packet=64M
--optimizer_use_condition_selectivity=1
--optimizer_switch="rowid_filter=off"
networks:
private:
public:
ipv4_address: ${IP_BASE}.3
env_file: env/mysql_maria.env
volumes:
- ./volumes/db:/var/lib/mysql
- ./provision/mariadb/create-test-db.sh:/docker-entrypoint-initdb.d/create-test-db.sh
volumes:
php_app:
driver: local
driver_opts:
type: none
o: bind
device: ${PHP_APP_PATH}
networks:
private:
public:
ipam:
config:
- subnet: ${IP_BASE}.0/24
gateway: ${IP_BASE}.1