docker-example-drupal/docker-compose.yaml

74 lines
1.4 KiB
YAML
Raw Normal View History

2023-03-14 20:20:48 +00:00
# Do not edit this file. It is automatically generated by 'build-configs'.
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:
web:
2023-01-21 15:50:45 +00:00
<<: *default-app
2023-03-17 15:45:45 +00:00
<<: *default-proxy
2023-01-21 15:50:45 +00:00
build:
context: .
target: web
depends_on:
- php
profiles: [web]
2023-03-14 20:20:48 +00:00
2023-01-21 15:50:45 +00:00
php:
<<: *default-app
build:
context: .
2023-01-21 15:50:45 +00:00
target: build
2023-03-14 20:20:48 +00:00
volumes:
- .:/app
2023-01-21 15:50:45 +00:00
depends_on:
- database
profiles: [php]
2023-01-21 15:50:45 +00:00
database:
image: mariadb:10
2023-01-21 15:50:45 +00:00
deploy:
resources:
limits:
cpus: "${DOCKER_MYSQL_CPUS:-0}"
memory: "${DOCKER_MYSQL_MEMORY:-0}"
volumes:
- db-data:/var/lib/mysql
2023-01-21 15:50:45 +00:00
env_file:
- .env
labels:
- "traefik.enabled=false"
environment:
2023-01-21 15:50:45 +00:00
MYSQL_RANDOM_ROOT_PASSWORD: true
profiles: [database]
volumes:
db-data: {}
2023-01-21 15:50:45 +00:00
networks:
web:
name: traefik_proxy