-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcompose.yml
More file actions
124 lines (113 loc) · 3.42 KB
/
compose.yml
File metadata and controls
124 lines (113 loc) · 3.42 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: ${APP_NAMESPACE}
services:
db:
hostname: db
build:
# Custom image for file permissions and performances
target: mariadb
args:
UID: ${UID}
cap_add:
- SYS_NICE # CAP_SYS_NICE
networks:
- default
volumes:
- "./.data/db:/var/lib/mysql"
environment:
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD:-root}
MARIADB_DATABASE: ${MARIADB_DATABASE:-roadiz}
MARIADB_USER: ${MARIADB_USER:-roadiz}
MARIADB_PASSWORD: ${MARIADB_PASSWORD:-roadiz}
pma:
image: phpmyadmin:5.2.1
environment:
PMA_HOST: db
UPLOAD_LIMIT: 64M
PMA_USER: ${MARIADB_USER:-roadiz}
PMA_PASSWORD: ${MARIADB_PASSWORD:-roadiz}
depends_on:
- db
app: &app_template
# Nginx does not resolve `app` hostname correctly
hostname: app
build:
target: php-dev
args:
UID: ${UID}
depends_on:
- db
- redis
volumes:
- ./:/app
networks:
default:
environment:
TRUSTED_PROXIES: ${TRUSTED_PROXIES}
UID: ${UID}
DEFAULT_GATEWAY: ${DEFAULT_GATEWAY}
nginx:
build:
target: nginx-dev
args:
UID: ${UID}
depends_on:
- app
volumes:
- ./:/app
worker:
<<: *app_template
hostname: worker
# official php-fpm image uses SIGQUIT
stop_signal: SIGTERM
entrypoint: [ "php", "-d", "memory_limit=-1", "/app/bin/console", "messenger:consume", "async", "--time-limit=600" ]
restart: unless-stopped
scheduler:
<<: *app_template
hostname: scheduler
# official php-fpm image uses SIGQUIT
stop_signal: SIGTERM
entrypoint: [ "php", "-d", "memory_limit=-1", "/app/bin/console", "messenger:consume", "scheduler_default", "--time-limit=600" ]
restart: unless-stopped
mailer:
hostname: mailer
image: axllent/mailpit
# Use Redis for Cache, Messaging and Sessions
redis:
hostname: redis
image: redis:7-alpine
volumes:
- redis:/data
redis-commander:
image: ghcr.io/joeferner/redis-commander:0.9.0
environment:
REDIS_HOST: redis
depends_on:
- redis
varnish:
build:
target: varnish
# https://github.com/varnish/docker-varnish/issues/53
user: root
# Prevent cache-tags to overflow headers max size by doubling default values
# https://github.com/api-platform/core/issues/3168
# https://www.varnish-software.com/developers/tutorials/troubleshooting-varnish/
command: "-p http_resp_hdr_len=16384 -p http_resp_size=65536"
ulimits:
memlock: -1
tmpfs: /var/lib/varnish/varnishd:exec
depends_on:
- nginx
links:
- nginx:nginx
environment:
VARNISH_SIZE: ${VARNISH_SIZE}
networks:
# If you need to use port forwarding, fixing default gateway can be useful
# to keep same host IP address between service restarts
default:
ipam:
driver: default
config:
- subnet: ${DEFAULT_GATEWAY}/24
volumes:
redis: