kopia lustrzana https://github.com/wagtail/docker-wagtail-develop
60 wiersze
1.5 KiB
YAML
60 wiersze
1.5 KiB
YAML
volumes:
|
|
postgres-data:
|
|
node_modules:
|
|
|
|
services:
|
|
web:
|
|
container_name: "web"
|
|
build: ./
|
|
working_dir: /code/bakerydemo
|
|
command: python 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"
|
|
depends_on:
|
|
- db
|
|
- frontend
|
|
|
|
db:
|
|
container_name: "db"
|
|
image: postgres:14
|
|
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
|
|
|
|
elastic:
|
|
container_name: elastic
|
|
image: elasticsearch:8.17.1
|
|
ports:
|
|
- "9200:9200"
|
|
- "9300:9300"
|
|
environment:
|
|
- xpack.security.enabled=false
|
|
- discovery.type=single-node
|