-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (32 loc) · 837 Bytes
/
docker-compose.yml
File metadata and controls
36 lines (32 loc) · 837 Bytes
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
version: '2'
services:
db:
image: postgres
env_file: secrets.env
volumes:
- ./dbdata:/var/lib/postgresql/data
web:
# Docker hack to wait until Postgres is up, then run stuff.
command: bash -c "while ! nc -w 1 -z db 5432; do sleep 0.1; done; ./manage.py migrate; sh -c 'npm run hot-reload & ./manage.py runserver 0.0.0.0:8000'"
image: django
container_name: hallway_web
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- .:/code
depends_on:
- db
environment:
IN_DOCKER: 1
env_file: secrets.env
webserver:
image: jumanjiman/caddy
depends_on:
- web
volumes:
- .:/code
ports:
- "80:8000"
- "3000:3000" # expose 3000 since this is node's (proxied) hot reload port
command: -conf /code/CaddyFile.dev