-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
55 lines (50 loc) · 1.43 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version: "3"
services:
db:
image: postgres:12.1
env_file: env.d/${ENV_FILE:-development}
ports:
- "5452:5432"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.0
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
# 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
# partaj:latest build.
base:
build: .
image: partaj: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
args:
DJANGO_CONFIGURATION: ${DJANGO_CONFIGURATION}
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
DJANGO_SETTINGS_MODULE: ${DJANGO_SETTINGS_MODULE}
image: partaj:dev
env_file:
- env.d/${ENV_FILE:-development}
# Override production container command that runs gunicorn in favor of the
# django development server
command: >
python manage.py runserver 0.0.0.0:8000
ports:
- "8080:8000"
volumes:
- .:/app
- ./data/static:/data/static
- ./data/media:/data/media
depends_on:
- "base"
- "db"
- "elasticsearch"
stdin_open: true
tty: true
dockerize:
image: jwilder/dockerize