oliverdavies.uk-drupal/docker-compose.yaml

72 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2024-04-04 17:00:00 +00:00
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
x-proxy: &default-proxy
networks:
- default
2024-05-11 11:46:57 +00:00
- proxy
2024-04-04 17:00:00 +00:00
labels:
2024-05-11 11:46:57 +00:00
- "traefik.enable=true"
2024-04-04 17:00:00 +00:00
- "traefik.docker.network=traefik_proxy"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(
2024-05-11 11:46:57 +00:00
`${COMPOSE_PROJECT_NAME}.docker.localhost`,
2024-04-04 17:00:00 +00:00
)"
2024-05-11 11:46:57 +00:00
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls=true"
2024-04-04 17:00:00 +00:00
x-app: &default-app
volumes:
- "${DOCKER_WEB_VOLUME:-./web:/var/www/html/web}"
2024-04-04 17:00:00 +00:00
env_file:
- .env
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
networks:
- default
deploy:
resources:
limits:
cpus: "${DOCKER_MYSQL_CPUS:-0}"
memory: "${DOCKER_MYSQL_MEMORY:-0}"
labels:
2024-05-11 11:46:57 +00:00
- "traefik.enable=false"
2024-04-04 17:00:00 +00:00
tty: true
services:
php:
<<: [*default-proxy, *default-app]
2024-04-04 17:00:00 +00:00
build:
context: .
target: build
args:
- "DOCKER_UID=${DOCKER_UID:-1000}"
volumes:
- .:/var/www/html
2024-04-04 17:00:00 +00:00
depends_on:
- database
profiles: [php]
database:
image: mariadb:10
deploy:
resources:
limits:
cpus: "${DOCKER_MYSQL_CPUS:-0}"
memory: "${DOCKER_MYSQL_MEMORY:-0}"
volumes:
- db-data:/var/lib/mysql
env_file:
- .env
labels:
2024-05-11 11:46:57 +00:00
- "traefik.enable=false"
2024-04-04 17:00:00 +00:00
environment:
MYSQL_RANDOM_ROOT_PASSWORD: true
profiles: [database]
volumes:
db-data: {}
networks:
2024-05-11 11:46:57 +00:00
proxy:
2024-04-04 17:00:00 +00:00
external: true
name: traefik_proxy