109 lines
3.2 KiB
YAML
109 lines
3.2 KiB
YAML
---
|
|
networks:
|
|
default:
|
|
name: ${PREFIX}
|
|
|
|
services:
|
|
adminer:
|
|
container_name: ${PREFIX}-adminer
|
|
dns:
|
|
- 1.1.1.1
|
|
hostname: ${PREFIX}-adminer
|
|
image: adminer:4.8.1-standalone
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.${PREFIX}-adminer.entrypoints=https
|
|
- traefik.http.routers.${PREFIX}-adminer.rule=Host(`adminer.${APP_URL}`)
|
|
- traefik.http.routers.${PREFIX}-adminer.tls=true
|
|
- traefik.http.services.${PREFIX}-adminer.loadbalancer.server.port=8080
|
|
app:
|
|
container_name: ${PREFIX}-app
|
|
dns:
|
|
- 1.1.1.1
|
|
environment:
|
|
- PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE}
|
|
- PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE}
|
|
- XDEBUG_CLIENT_HOST=${XDEBUG_CLIENT_HOST}
|
|
- XDEBUG_MODE=${XDEBUG_MODE}
|
|
hostname: ${PREFIX}-app
|
|
image: ${APP_IMAGE_TAG}
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.${PREFIX}-web.entrypoints=http
|
|
- traefik.http.routers.${PREFIX}-web.middlewares=https-redirect@file
|
|
- traefik.http.routers.${PREFIX}-web.rule=Host(`${APP_URL}`)
|
|
- traefik.http.routers.${PREFIX}-webssl.entrypoints=https
|
|
- traefik.http.routers.${PREFIX}-webssl.rule=Host(`${APP_URL}`)
|
|
- traefik.http.routers.${PREFIX}-webssl.tls=true
|
|
- traefik.http.services.${PREFIX}-webssl.loadbalancer.server.port=80
|
|
volumes:
|
|
- root:/root
|
|
- webroot:/var/www/html
|
|
- wp-cli-cache:/var/www/.wp-cli
|
|
- cache:/var/www/.cache
|
|
db:
|
|
command: --default-authentication-plugin=mysql_native_password
|
|
container_name: ${PREFIX}-db
|
|
environment:
|
|
MYSQL_DATABASE: ${DB_NAME}
|
|
MYSQL_PASSWORD: ${DB_USER_PASSWORD}
|
|
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
|
MYSQL_USER: ${DB_USER}
|
|
hostname: ${PREFIX}-db
|
|
image: mariadb:10.4.6-bionic
|
|
ports:
|
|
- "${TRAEFIK_LISTENING_IP}:3306:3306"
|
|
volumes:
|
|
- db:/var/lib/mysql
|
|
traefik:
|
|
container_name: ${PREFIX}-traefik
|
|
command: ["--configFile=/etc/traefik/static/traefik.yml"]
|
|
dns:
|
|
- 1.1.1.1
|
|
image: traefik:2.5.3
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.${PREFIX}-traefik.entrypoints=https
|
|
- traefik.http.routers.${PREFIX}-traefik.rule=Host(`traefik.${APP_URL}`)
|
|
- traefik.http.routers.${PREFIX}-traefik.service=api@internal
|
|
- traefik.http.routers.${PREFIX}-traefik.tls=true
|
|
ports:
|
|
- "${TRAEFIK_LISTENING_IP}:80:80"
|
|
- "${TRAEFIK_LISTENING_IP}:443:443"
|
|
volumes:
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- traefik-certs:/certs:ro
|
|
- traefik-dynamic:/etc/traefik/dynamic:ro
|
|
- traefik-logs:/logs
|
|
- traefik-static:/etc/traefik/static:ro
|
|
|
|
volumes:
|
|
cache:
|
|
external: true
|
|
name: composer-cache
|
|
db:
|
|
external: true
|
|
name: ${PREFIX}-db
|
|
root:
|
|
external: true
|
|
name: ${PREFIX}-root
|
|
traefik-certs:
|
|
external: true
|
|
name: ${PREFIX}-traefik-certs
|
|
traefik-dynamic:
|
|
external: true
|
|
name: ${PREFIX}-traefik-dynamic
|
|
traefik-logs:
|
|
external: true
|
|
name: ${PREFIX}-traefik-logs
|
|
traefik-static:
|
|
external: true
|
|
name: ${PREFIX}-traefik-static
|
|
webroot:
|
|
external: true
|
|
name: ${PREFIX}-webroot
|
|
wp-cli-cache:
|
|
external: true
|
|
name: wp-cli-cache
|