docker-example-drupal/docker-compose.yaml

80 lines
1.6 KiB
YAML
Raw Permalink Normal View History

2023-06-27 20:21:55 +00:00
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
2023-03-14 20:20:48 +00:00
2023-03-17 15:45:45 +00:00
x-proxy: &default-proxy
networks:
- default
2024-05-10 22:00:47 +00:00
- proxy
2023-03-17 15:45:45 +00:00
labels:
2024-05-10 21:55:28 +00:00
- "traefik.enable=true"
2023-03-17 15:45:45 +00:00
- "traefik.docker.network=traefik_proxy"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(
2024-05-10 21:55:28 +00:00
`${COMPOSE_PROJECT_NAME}.docker.localhost`,
2023-03-17 15:45:45 +00:00
)"
2024-05-10 21:55:28 +00:00
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls=true"
2023-03-17 15:45:45 +00:00
2023-01-21 15:50:45 +00:00
x-app: &default-app
volumes:
2023-03-14 23:19:47 +00:00
- "${DOCKER_WEB_VOLUME:-./web:/app/web}"
2023-01-21 15:50:45 +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-10 21:55:28 +00:00
- "traefik.enable=false"
2023-01-21 15:50:45 +00:00
tty: true
services:
2023-05-09 19:12:07 +00:00
web:
2023-05-09 19:03:30 +00:00
<<: [*default-proxy, *default-app]
build:
context: .
target: web
depends_on:
- php
profiles: [web]
2023-05-09 19:12:07 +00:00
2023-01-21 15:50:45 +00:00
php:
2023-06-05 22:12:12 +00:00
<<: [*default-app]
build:
context: .
2023-01-21 15:50:45 +00:00
target: build
2023-03-17 16:56:38 +00:00
args:
- "DOCKER_UID=${DOCKER_UID:-1000}"
2023-03-14 20:20:48 +00:00
volumes:
- .:/app
2023-05-09 19:03:30 +00:00
depends_on:
- database
2023-01-21 15:50:45 +00:00
profiles: [php]
2023-05-09 19:03:30 +00:00
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-10 21:55:28 +00:00
- "traefik.enable=false"
2023-05-09 19:03:30 +00:00
environment:
MYSQL_RANDOM_ROOT_PASSWORD: true
profiles: [database]
volumes:
db-data: {}
2023-09-24 21:57:34 +00:00
2023-01-21 15:50:45 +00:00
networks:
2024-05-10 22:00:47 +00:00
proxy:
2023-06-27 20:21:55 +00:00
external: true
2023-01-21 15:50:45 +00:00
name: traefik_proxy