kopia lustrzana https://github.com/wagtail/docker-wagtail-develop
49 wiersze
1.3 KiB
YAML
49 wiersze
1.3 KiB
YAML
version: '3'
|
|
|
|
volumes:
|
|
postgres-data:
|
|
node_modules:
|
|
|
|
services:
|
|
web:
|
|
container_name: "web"
|
|
build: ./
|
|
working_dir: /code/bakerydemo
|
|
command: ./manage.py runserver 0.0.0.0:8000
|
|
restart: "no"
|
|
volumes:
|
|
- ./wagtail:/code/wagtail:delegated,rw
|
|
- ./bakerydemo:/code/bakerydemo:delegated,rw
|
|
- node_modules:/code/wagtail/node_modules/
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
DATABASE_URL: "postgres://wagtail:changeme@db/wagtail"
|
|
PYTHONPATH: "/code/wagtail:/code/bakerydemo:$PYTHONPATH"
|
|
depends_on:
|
|
- db
|
|
- frontend
|
|
db:
|
|
container_name: "db"
|
|
image: postgres:12.3-alpine
|
|
environment:
|
|
POSTGRES_USER: wagtail
|
|
POSTGRES_DB: wagtail
|
|
POSTGRES_PASSWORD: changeme
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
restart: "no"
|
|
expose:
|
|
- "5432"
|
|
frontend:
|
|
container_name: "frontend"
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.frontend
|
|
working_dir: /code/wagtail
|
|
volumes:
|
|
- ./wagtail:/code/wagtail:delegated,rw
|
|
- node_modules:/code/wagtail/node_modules/
|
|
command: bash -c "echo 'Copying node_modules, this may take a few minutes...' && rsync -rah --info=progress2 /node_modules /code/wagtail/ && npm run start"
|
|
restart: "no"
|
|
tty: true |