atdc/docker-compose.yaml

80 lines
1.6 KiB
YAML
Raw Normal View History

2024-05-10 21:55:32 +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-10 22:00:51 +00:00
- proxy
2024-05-10 21:55:32 +00:00
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik_proxy"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(
`${COMPOSE_PROJECT_NAME}.docker.localhost`,
)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls=true"
x-app: &default-app
volumes:
- "${DOCKER_WEB_VOLUME:-./web:/app/web}"
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.enable=false"
tty: true
services:
2024-07-31 19:46:02 +00:00
web:
<<: [*default-proxy, *default-app]
build:
context: .
target: web
depends_on:
- php
profiles: [web]
2024-05-10 21:55:32 +00:00
php:
<<: [*default-app]
build:
context: .
target: build
args:
- "DOCKER_UID=${DOCKER_UID:-1000}"
volumes:
- .:/app
2024-07-31 19:46:02 +00:00
depends_on:
- database
2024-05-10 21:55:32 +00:00
profiles: [php]
database:
2024-07-31 19:46:02 +00:00
image: mariadb:10
2024-05-10 21:55:32 +00:00
deploy:
resources:
limits:
cpus: "${DOCKER_MYSQL_CPUS:-0}"
memory: "${DOCKER_MYSQL_MEMORY:-0}"
volumes:
- db-data:/var/lib/mysql
env_file:
- .env
labels:
- "traefik.enable=false"
environment:
MYSQL_RANDOM_ROOT_PASSWORD: true
profiles: [database]
volumes:
db-data: {}
networks:
2024-05-10 22:00:51 +00:00
proxy:
2024-05-10 21:55:32 +00:00
external: true
name: traefik_proxy