Add local environment with Docker Compose

This commit is contained in:
Oliver Davies 2021-02-09 14:37:50 +00:00
parent f764004f89
commit d8a1616481
5 changed files with 115 additions and 0 deletions

52
docker-compose.yaml Normal file
View file

@ -0,0 +1,52 @@
version: '2.4'
networks:
public:
external:
name: traefik_proxy
volumes:
node_modules: ~
services:
nginx:
image: nginx:1
working_dir: /app
volumes:
- ./:/app
- ./tools/docker/images/nginx/configs/vhost.conf:/etc/nginx/conf.d/default.conf
# ports:
# - 9000:80
depends_on:
node:
condition: service_started
php:
condition: service_started
networks:
default: {}
public: {}
labels:
- traefik.docker.network=traefik_proxy
- traefik.enable=true
- traefik.http.routers.workshop-tailwind.rule=Host(`workshop-tailwind.docker.localhost`)
php:
build:
context: .
dockerfile: tools/docker/Dockerfile
target: dev
volumes:
- ./:/app
networks:
default: {}
labels:
- "traefik.enable=false"
node:
image: node:12
working_dir: /node/app
volumes:
- .:/node/app
- node_modules:/node/app/node_modules
labels:
- "traefik.enabled=false"