generated from dunglas/symfony-docker
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
58 lines (55 loc) · 1.45 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
version: "3.4"
services:
php:
build:
context: .
target: symfony_php
args:
SYMFONY_VERSION: ${SYMFONY_VERSION:-5.4.*}
STABILITY: ${STABILITY:-stable}
restart: unless-stopped
volumes:
- php_socket:/var/run/php
healthcheck:
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
environment:
MERCURE_URL: ${MERCURE_URL:-http://caddy/.well-known/mercure}
MERCURE_PUBLIC_URL: ${MERCURE_PUBLIC_URL:-https://localhost/.well-known/mercure}
MERCURE_JWT_SECRET: ${MERCURE_JWT_SECRET:-!ChangeMeToA256BitRandomHashOrStringThatIsSecureEnough!}
SYMFONY_VERSION: 5.4.*
caddy:
build:
context: .
target: symfony_caddy
depends_on:
- php
environment:
SERVER_NAME: ${SERVER_NAME:-localhost, caddy:80}
MERCURE_PUBLISHER_JWT: ${MERCURE_JWT_SECRET:-!ChangeMeToA256BitRandomHashOrStringThatIsSecureEnough!}
MERCURE_SUBSCRIBER_JWT: ${MERCURE_JWT_SECRET:-!ChangeMeToA256BitRandomHashOrStringThatIsSecureEnough!}
restart: unless-stopped
volumes:
- php_socket:/var/run/php
- caddy_data:/data
- caddy_config:/config
ports:
# HTTP
- target: 80
published: 80
protocol: tcp
# HTTPS
- target: 443
published: 443
protocol: tcp
# HTTP/3
- target: 443
published: 443
protocol: udp
volumes:
php_socket:
caddy_data:
caddy_config:
db-data: