mirror of
https://gh.wpcy.net/https://github.com/fairpm/server.git
synced 2026-06-19 02:53:45 +08:00
90 lines
2.8 KiB
YAML
90 lines
2.8 KiB
YAML
#
|
|
# Development environment for fair.pm website
|
|
#
|
|
|
|
services:
|
|
fairpm-wordpress:
|
|
build:
|
|
dockerfile: docker/fairpm-wordpress/Dockerfile
|
|
context: .
|
|
target: dev
|
|
restart: unless-stopped
|
|
volumes:
|
|
- .:/app
|
|
- ./docker/fairpm-wordpress/php.local.ini:/usr/local/etc/php/conf.d/php.local.ini
|
|
- ./docker/fairpm-wordpress/Caddyfile:/etc/caddy/Caddyfile
|
|
networks:
|
|
app-net: ~
|
|
labels:
|
|
- 'traefik.enable=true'
|
|
- 'traefik.http.routers.fairpm.rule=HostRegexp(`^(?i)^((api|translate|chat|beacon)\.)?local\.fair\.pm$`)'
|
|
- 'traefik.http.routers.fairpm-https.rule=HostRegexp(`^(?i)^((api|translate|chat|beacon)\.)?local\.fair\.pm$`)'
|
|
- 'traefik.http.routers.fairpm-https.tls=true'
|
|
healthcheck:
|
|
# healthchecks on the app container are generally useless for dev environments:
|
|
# the last thing we want is for traefik to drop the backend because of 500 errors -- we want to see those!
|
|
disable: true
|
|
# not using curl -f for dev, since a 500 error keeps the container from appearing in traefik
|
|
test: ["CMD", "curl", "http://localhost/"]
|
|
timeout: 2s
|
|
retries: 10
|
|
start_period: 10s
|
|
start_interval: 1s
|
|
|
|
|
|
fairpm-db:
|
|
image: mariadb@sha256:607835cd628b78e2876f6a586d0ec37b296c47683b31ef750002d3d17d3d8f7a # 12.0.2
|
|
restart: unless-stopped
|
|
environment:
|
|
MYSQL_DATABASE: wordpress
|
|
MYSQL_USER: wp
|
|
MYSQL_PASSWORD: password
|
|
MYSQL_ROOT_PASSWORD: password
|
|
volumes:
|
|
- fairpm-db-vol:/var/lib/mysql
|
|
networks:
|
|
app-net: ~
|
|
healthcheck:
|
|
test: [ "CMD", "mariadb-admin", "ping", "-h", "localhost", "-u", "root", "-ppassword" ]
|
|
timeout: 2s
|
|
retries: 10
|
|
start_period: 10s
|
|
start_interval: 1s
|
|
|
|
|
|
# redis:
|
|
# image: redis:latest
|
|
# networks:
|
|
# - app-net
|
|
#
|
|
# mailpit:
|
|
# image: axllent/mailpit:v1.21.4
|
|
# restart: unless-stopped
|
|
# networks:
|
|
# app-net: ~
|
|
# environment:
|
|
# MP_MAX_MESSAGES: 500
|
|
# MP_SMTP_AUTH_ACCEPT_ANY: 1
|
|
# MP_SMTP_AUTH_ALLOW_INSECURE: 1
|
|
|
|
# prometheus:
|
|
# image: prom/prometheus:latest
|
|
# volumes:
|
|
# - ./docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
# networks:
|
|
# - app-net
|
|
#
|
|
# grafana:
|
|
# image: grafana/grafana:latest
|
|
# networks:
|
|
# - app-net
|
|
# volumes:
|
|
# - ./docker/grafana:/etc/grafana/provisioning
|
|
|
|
volumes:
|
|
fairpm-db-vol:
|
|
|
|
networks:
|
|
app-net: ~
|
|
traefik:
|
|
external: true
|