Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (43 loc) · 2.45 KB
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (43 loc) · 2.45 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
#
# Docker Compose file for the Derafu Sites Server.
#
# This file is used to configure the docker container for the Derafu Sites Server.
#
services:
# Main web server service using Django and Caddy.
webserver:
# Build configuration for the container.
build:
context: . # Use the current directory as build context.
dockerfile: Dockerfile # Use the Dockerfile in the current directory.
args:
# Build arguments passed to the Dockerfile.
CADDY_DEBUG: ${CADDY_DEBUG:-} # Debug mode for Caddy.
WWW_ROOT_PATH: ${WWW_ROOT_PATH:-/var/www/sites} # Root path for websites.
WWW_USER: ${WWW_USER:-admin} # User for web server operations.
WWW_GROUP: ${WWW_GROUP:-www-data} # Group for web server operations.
PHPY_ENABLED: ${PHPY_ENABLED:-false} # Build PHP (--enable-embed) + phpy so Python can host PHP.
PHPY_PHP_VERSION: ${PHPY_PHP_VERSION:-8.5.12} # PHP version to build when PHPY_ENABLED=true.
PHPY_PHP_SHA256: ${PHPY_PHP_SHA256:-81a0f450349e84b08eb43faa85f8a4c835684f3cc1c50471775d1317a046c525} # SHA-256 of that PHP release tarball.
PHPY_REF: ${PHPY_REF:-6629eec8b95e99843498c59bc1d9294315847f48} # phpy commit to build.
# Name of the container.
container_name: ${SERVER_NAME:-derafu-sites-server-python-caddy}
# Environment variables passed to the container.
environment:
SERVER_NAME: ${SERVER_NAME:-derafu-sites-server-python-caddy} # Server name.
CADDY_DEBUG: ${CADDY_DEBUG:-} # Debug mode for Caddy.
CADDY_EMAIL: ${CADDY_EMAIL:-admin@example.com} # Email for Caddy SSL certificates.
CADDY_LOG_SIZE: ${CADDY_LOG_SIZE:-100mb} # Maximum size of Caddy logs.
CADDY_LOG_KEEP: ${CADDY_LOG_KEEP:-5} # Number of log files to keep.
CADDY_HTTPS_ALLOW_ANY_HOST: ${CADDY_HTTPS_ALLOW_ANY_HOST:-false}
CADDY_HTTPS_ISSUER: ${CADDY_HTTPS_ISSUER:-internal} # HTTPS certificate issuer.
WWW_ROOT_PATH: ${WWW_ROOT_PATH:-/var/www/sites} # Root path for websites.
WWW_USER: ${WWW_USER:-admin} # User for web server operations.
SITES_DIR: ${SITES_DIR:-/home/admin/sites} # Directory for site configurations.
EDITOR: ${EDITOR:-vim} # Default text editor.
VISUAL: ${VISUAL:-vim} # Default visual editor.
# Restart policy for the container.
restart: unless-stopped
# Volume mappings for persistent data.
volumes:
- ${VOLUME_SITES:-./sites}:${WWW_ROOT_PATH:-/var/www/sites} # Sites directory.