-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathcompose.yaml
49 lines (46 loc) · 1.24 KB
/
compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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