-
-
Notifications
You must be signed in to change notification settings - Fork 520
Expand file tree
/
Copy pathdocker-compose.frankenphp.yaml
More file actions
64 lines (60 loc) · 2.36 KB
/
docker-compose.frankenphp.yaml
File metadata and controls
64 lines (60 loc) · 2.36 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
# docker-compose.frankenphp.yaml — Example FrankenPHP deployment for ChurchCRM
#
# This is a REFERENCE CONFIGURATION for self-hosted deployments using FrankenPHP
# instead of Apache or nginx + PHP-FPM. FrankenPHP bundles Caddy and PHP in a
# single container, resulting in a simpler two-service stack (web + database).
# It is NOT used by the automated test suite (which uses docker-compose.yaml
# with Apache). Use this as a starting point for your own deployment.
#
# QUICK START
# -----------
# 1. Copy this file and docker/frankenphp/Caddyfile to your deployment directory.
# 2. Copy docker/Config.php to Include/Config.php in your ChurchCRM source tree
# and set the database connection details to match the values below.
# 3. Set MYSQL_ROOT_PASSWORD and MYSQL_PASSWORD to strong secrets.
# 4. Run: docker compose -f docker-compose.frankenphp.yaml up -d
# 5. Visit http://localhost/ - you will be redirected to the setup wizard on
# first run (no database tables) or to the login page after installation.
#
# IMPORTANT: Change all passwords before exposing this to the internet.
services:
database:
image: mariadb:11
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-changeme_root}
MYSQL_DATABASE: churchcrm
MYSQL_USER: churchcrm
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-changeme}
volumes:
- churchcrm-db:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
timeout: 20s
retries: 10
hostname: database
churchcrm:
build:
context: .
dockerfile: Dockerfile.churchcrm-frankenphp
target: prod
image: churchcrm/crm:frankenphp
restart: unless-stopped
ports:
- "${WEBSERVER_PORT:-80}:80"
volumes:
# Mount ChurchCRM source (the contents of src/) here.
# Options:
# a) Replace with a bind mount to a local directory:
# - /path/to/churchcrm/src:/var/www/html
# b) Copy files into this named volume after the first `docker compose up`:
# docker cp /path/to/churchcrm/src/. churchcrm-churchcrm-1:/var/www/html/
# c) Build a custom image with COPY instructions in your own Dockerfile.
- churchcrm-www:/var/www/html
depends_on:
database:
condition: service_healthy
hostname: churchcrm
volumes:
churchcrm-db:
churchcrm-www: