-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
63 lines (60 loc) · 1.79 KB
/
docker-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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: '3.7'
services:
web:
build:
context: .
dockerfile: docker/dockerfiles/web
args:
- POETRY_ARGS= # allow dev install
user: ${UID:-toolhub} # user id or default
command: ./manage.py runserver_plus 0.0.0.0:8000 # override for local dev
restart: unless-stopped
volumes:
- ".:/srv/app"
- "python-packages:/usr/local/lib/python3.6/site-packages:z"
- "upload-volume:/var/www/media"
ports:
- '8000:8000'
environment:
DEBUG: 'true'
ALLOWED_HOSTS: '*'
DJANGO_SETTINGS_MODULE: toolhub.settings.env
DATABASE_URL: postgres://postgres:postgres@toolhub-db/toolhub
MEDIA_ROOT: /var/www/media/
STATIC_ROOT: /var/www/static/
DEBUG_TOOLBAR_ENABLE: 'true'
PYTHONUNBUFFERED: 1
depends_on:
- db
env_file: .dockerenv
networks:
app_net:
aliases:
- toolhub-web
db:
image: postgres:11.0
ports:
- "${DB_PORT-0}:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: toolhub
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- "db-volume:/var/lib/postgresql/data/pgdata"
- "./docker/init/db:/docker-entrypoint-initdb.d"
networks:
app_net:
aliases:
- toolhub-db
volumes:
db-volume:
name: toolhub_db-volume
python-packages:
name: toolhub_python-packages
upload-volume:
name: toolhub_upload-volume
networks:
app_net:
name: toolhub-net
driver: bridge