mirror of
https://github.com/opdavies/build-configs.git
synced 2025-09-06 03:15:34 +01:00
Add remaining templates
This commit is contained in:
parent
014b6dabeb
commit
579c476a54
8 changed files with 198 additions and 5 deletions
65
templates/docker-compose.yaml.twig
Normal file
65
templates/docker-compose.yaml.twig
Normal file
|
@ -0,0 +1,65 @@
|
|||
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.enabled=false"
|
||||
tty: true
|
||||
|
||||
services:
|
||||
web:
|
||||
<<: *default-app
|
||||
build:
|
||||
context: .
|
||||
target: web
|
||||
depends_on:
|
||||
- php
|
||||
networks:
|
||||
- default
|
||||
- web
|
||||
labels:
|
||||
- "traefik.docker.network=traefik_proxy"
|
||||
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_PROJECT_NAME}.localhost`)"
|
||||
profiles: [web]
|
||||
|
||||
php:
|
||||
<<: *default-app
|
||||
build:
|
||||
context: .
|
||||
target: {{ dockerCompose.services.php.build.target }}
|
||||
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:
|
||||
- "traefik.enabled=false"
|
||||
environment:
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: true
|
||||
profiles: [database]
|
||||
|
||||
volumes:
|
||||
db-data: {}
|
||||
|
||||
networks:
|
||||
web:
|
||||
name: traefik_proxy
|
Loading…
Add table
Add a link
Reference in a new issue