forked from thecourseforum/theCourseForum2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (39 loc) · 1 KB
/
docker-compose.yml
File metadata and controls
40 lines (39 loc) · 1 KB
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
version: "3"
services:
web:
build:
context: .
args:
REQUIREMENTS: requirements/dev.txt
command:
bash -c "/wait-for-it.sh tcf_db:${DB_PORT} -- \
python manage.py migrate && \
python manage.py collectstatic --noinput && \
python manage.py invalidate_cachalot tcf_website && \
echo 'Starting Django Server...' && \
python manage.py runserver 0.0.0.0:8000"
environment:
- DJANGO_SETTINGS_MODULE=tcf_core.settings.dev
volumes:
- .:/app
- /app/db/ # exclude the subfolder to prevent potential interference
- node_modules:/app/node_modules
ports:
- "8000:8000"
container_name: tcf_django
restart: always
depends_on:
- db
db:
image: postgres:17.5
volumes:
- ./db:/app
restart: always
container_name: tcf_db
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
POSTGRES_PORT: ${DB_PORT}
volumes:
node_modules: