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
35 lines (34 loc) · 940 Bytes
/
docker-compose.yml
File metadata and controls
35 lines (34 loc) · 940 Bytes
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
version: "3"
services:
web:
build: .
command:
bash -c "if [ \"${ENVIRONMENT}\" = 'dev' ]; then /wait-for-it.sh tcf_db:${DB_PORT} || exit 1; fi && \
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"
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: