-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose.yml
39 lines (36 loc) · 1.13 KB
/
docker-compose.yml
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
version: "3"
services:
db:
image: postgres:10.3
env_file: env.d/development
ports:
- "5442:5432"
# We use our production image as a basis for the development image, hence, we
# define a "base" service upon which the "app" service depends to force
# videofront:latest build.
base:
build: .
image: videofront:latest
# Override the default command so that the container exists immediately when
# it is run (no server).
command: echo "I should exit now. Bye."
app:
build:
context: .
dockerfile: ./docker/images/dev/Dockerfile
image: videofront:dev
env_file: env.d/development
# Override production container command that runs gunicorn in favor of the
# django development server (wrapped by dockerize to ensure the db is ready
# to accept connections before running the development server)
command: >
dockerize -wait tcp://db:5432 -timeout 60s python ./manage.py runserver 0.0.0.0:8000
ports:
- "8050:8000"
volumes:
- .:/app
- ./data/static:/data/static
- ./data/media:/data/media
depends_on:
- "base"
- "db"