-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
78 lines (73 loc) · 2.56 KB
/
compose.yaml
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.4"
services:
# PHP Service for Symfony application
php:
image: ${IMAGES_PREFIX:-}app-php
depends_on:
- database
restart: unless-stopped
container_name: asera-api
healthcheck:
test: "curl -f http://localhost:2019/metrics || exit 1"
interval: 60s
timeout: 15s
retries: 3
start_period: 2m
environment:
# Define environment variables for the PHP service
SERVER_NAME: ${SERVER_NAME:-localhost}, localhost:8080
MERCURE_PUBLISHER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!}
MERCURE_SUBSCRIBER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!}
TRUSTED_PROXIES: ${TRUSTED_PROXIES:-127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16}
TRUSTED_HOSTS: ^(api.a-sera.org|a-sera.org|localhost|php)$$
DATABASE_URL: postgresql://${POSTGRES_USER:-aseraadmin}:${POSTGRES_PASSWORD:-aserapass}@database:5432/${POSTGRES_DB:-asera-db}?serverVersion=${POSTGRES_VERSION:-15}&charset=${POSTGRES_CHARSET:-utf8}
MERCURE_URL: ${CADDY_MERCURE_URL:-https://localhost:8080/.well-known/mercure}
MERCURE_PUBLIC_URL: https://${SERVER_NAME:-localhost:8080}/.well-known/mercure
MERCURE_JWT_SECRET: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!}
volumes:
# Define volumes for the PHP service
- caddy_data:/data
- caddy_config:/config
ports:
# Define ports for the PHP service
# HTTP
- target: 8080
published: ${HTTP_PORT:-8080}
protocol: tcp
# HTTPS
- target: 443
published: ${HTTPS_PORT:-443}
protocol: tcp
# HTTP/3
- target: 443
published: ${HTTP3_PORT:-443}
protocol: udp
# Database service
database:
image: postgres:${POSTGRES_VERSION:-15}-alpine
container_name: asera-db
environment:
# Define environment variables for the database service
- POSTGRES_DB=${POSTGRES_DB:-asera-db}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-aserapass}
- POSTGRES_USER=${POSTGRES_USER:-aseraadmin}
volumes:
# Define volumes for the database service
- db_data:/var/lib/postgresql/data
ports:
# Define ports for the database service
- "5432:5432"
# Mailcatcher service
mailcatcher:
image: schickling/mailcatcher
ports:
# Define ports for the Mailcatcher service
# Mailcatcher web interface
- "1080:1080"
# Mailcatcher SMTP port
- "1025:1025"
# Define named volumes used by the services
volumes:
caddy_data:
caddy_config:
db_data: