docker-example-drupal/docker-compose.yaml

76 lines
1.5 KiB
YAML
Raw Normal View History

2023-05-09 20:32:29 +00:00
# Do not edit this file. It is automatically generated by https://oliverdavies.dev/build-configs.
2023-03-14 20:20:48 +00:00
2023-03-17 15:45:45 +00:00
x-proxy: &default-proxy
networks:
- default
- web
labels:
- "traefik.docker.network=traefik_proxy"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(
`${COMPOSE_PROJECT_NAME}.localhost`,
)"
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:
- "traefik.enabled=false"
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:02:34 +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:
- "traefik.enabled=false"
environment:
MYSQL_RANDOM_ROOT_PASSWORD: true
profiles: [database]
volumes:
db-data: {}
2023-01-21 15:50:45 +00:00
networks:
web:
name: traefik_proxy