-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
106 lines (105 loc) · 3.38 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
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
services:
###> doctrine/doctrine-bundle ###
database:
image: pgautoupgrade/pgautoupgrade:${POSTGRES_VERSION:-17-alpine}
environment:
POSTGRES_DB: ${POSTGRES_DB:-app}
# You should definitely change the password in production
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}
POSTGRES_USER: ${POSTGRES_USER:-app}
healthcheck:
test: [
"CMD",
"pg_isready",
"-d",
"${POSTGRES_DB:-app}",
"-U",
"${POSTGRES_USER:-app}",
]
timeout: 5s
retries: 5
start_period: 60s
volumes:
- database_data:/var/lib/postgresql/data:rw
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/db/data:/var/lib/postgresql/data:rw
###< doctrine/doctrine-bundle ###
redis:
image: redis:${REDIS_VERSION:-7}-alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
timeout: 5s
retries: 5
start_period: 60s
volumes:
- redis_data:/data:rw
meilisearch:
image: getmeili/meilisearch:${MEILISEARCH_VERSION:-nightly}
environment:
MEILI_MASTER_KEY: ${MEILI_MASTER_KEY:-!MasterChangeMe!}
volumes:
- meili_data:/meili_data:rw
healthcheck:
test: set -o pipefail;curl -fsS http://localhost:7700/health | grep -q '{"status":"available"}'
retries: 3
timeout: 5s
sqlrunner:
image: ghcr.io/database-playground/sqlrunner-v2:main
php:
image: ${IMAGES_PREFIX:-}app-sf
restart: unless-stopped
environment:
SERVER_NAME: ${SERVER_NAME:-localhost}, php:80
DATABASE_URL: "postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-!ChangeMe!}@database:5432/${POSTGRES_DB:-app}?serverVersion=${POSTGRES_VERSION:-17}&charset=${POSTGRES_CHARSET:-utf8}"
REDIS_URI: "redis://redis:6379"
MEILISEARCH_URL: "http://meilisearch:7700"
MEILISEARCH_API_KEY: ${MEILI_MASTER_KEY:-!MasterChangeMe!}
SQLRUNNER_URL: "http://sqlrunner:8080"
MESSENGER_TRANSPORT_DSN: "${REDIS_URI}/messages"
volumes:
- caddy_data:/data
- caddy_config:/config
- web_node_modules:/app/node_modules
ports:
# HTTP
- target: 80
published: ${HTTP_PORT:-80}
protocol: tcp
# HTTPS
- target: 443
published: ${HTTPS_PORT:-443}
protocol: tcp
# HTTP/3
- target: 443
published: ${HTTP3_PORT:-443}
protocol: udp
worker:
image: ${IMAGES_PREFIX:-}app-sf-worker
build:
dockerfile: worker.Dockerfile
context: .
environment:
DATABASE_URL: "postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-!ChangeMe!}@database:5432/${POSTGRES_DB:-app}?serverVersion=${POSTGRES_VERSION:-17}&charset=${POSTGRES_CHARSET:-utf8}"
REDIS_URI: "redis://redis:6379"
MEILISEARCH_URL: "http://meilisearch:7700"
MEILISEARCH_API_KEY: ${MEILI_MASTER_KEY:-!MasterChangeMe!}
MESSENGER_TRANSPORT_DSN: "${REDIS_URI}/messages"
MESSENGER_CONSUMER_NAME: app-sf-worker-1
restart: unless-stopped
depends_on:
php:
condition: service_healthy
worker-2:
extends:
service: worker
environment:
MESSENGER_CONSUMER_NAME: app-sf-worker-2
volumes:
###> doctrine/doctrine-bundle ###
database_data:
###< doctrine/doctrine-bundle ###
redis_data:
caddy_data:
caddy_config:
meili_data:
web_node_modules: