-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
18 lines (14 loc) · 819 Bytes
/
docker-compose.yml
File metadata and controls
18 lines (14 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
version: '3.7'
services:
app:
build:
context: . # local directory which will use the Dockerfile to create the app service
ports:
- "8000:8000" # run the project using port 8000. Map port 8000 on local machine to the docker container so to access it
volumes:
- ./app:/app # maps the project app to the app dir within the container. Allows changes in the docker container app in real time
command: sh -c "python manage.py runserver 0.0.0.0:8000" # using this command for local dev. and not using the entrypoint which is for production purpose
environment:
- DEBUG=1 #set app to debug state
# this docker-compose file is used to run the application on our local machine for the purpose of local development
# save and run docker-compose up to run the app locally