-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
51 lines (51 loc) · 1.41 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
version: '3.7'
services:
database:
image: "postgres:11.2"
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-developer}
- POSTGRES_USER=${POSTGRES_USER:-developer}
- POSTGRES_DB=${POSTGRES_DB:-djfractions}
- PGDATA=${PGDATA:-/var/lib/postgresql/data/pgdata}
privileged: true
volumes:
- db:/var/lib/postgresql/data
redis:
image: 'redis:latest'
restart: on-failure
volumes:
- redis:/data
django:
image: djfractions:dev
#image: blog:test
command: /bin/bash -ic 'make setup-and-run'
#command: gunicorn --workers 2 --bind 0.0.0.0:8000 --name django --max-requests=1000 bash_shell_net.wsgi:application
# command: /bin/bash
stdin_open: true
tty: true
depends_on:
- database
- redis
working_dir: /django/djfractions
# command: /home/developer/docker_entrypoints/dev_entrypoint.sh
build:
context: .
dockerfile: Dockerfile
target: dev
environment:
- REDIS_HOST=redis
- PIPENV_VENV_IN_PROJECT=1
# - DJANGO_SETTINGS_MODULE=bash_shell_net.settings.local
- SHELL=/bin/bash
- DATABASE_URL=postgres://developer:developer@database:5432/djfractions
- LOG_LEVEL=DEBUG
ports:
- "8000:8000"
restart: on-failure
volumes:
- .:/django/djfractions/
- ~/.gitconfig:/django/.gitconfig:ro
- ~/.ssh:/django/.ssh:ro
volumes:
db:
redis: