mirror of
https://github.com/aykhans/series-robot-web.git
synced 2025-09-03 21:43:34 +00:00
Dockerfile split into prod and dev
This commit is contained in:
6
Docker/Dev/Dockerfile
Normal file
6
Docker/Dev/Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM python:3
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
WORKDIR /code
|
||||
COPY requirements.txt /code/
|
||||
RUN pip install -r requirements.txt
|
||||
COPY src /code/src/
|
18
Docker/Dev/docker-compose.yml
Normal file
18
Docker/Dev/docker-compose.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
django:
|
||||
restart: always
|
||||
environment:
|
||||
- DJANGO_SETTINGS_MODULE=config.settings.development
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: Docker/Dev/Dockerfile
|
||||
command: >
|
||||
bash -c "python3 src/manage.py makemigrations
|
||||
&& python3 src/manage.py migrate
|
||||
&& python src/manage.py runserver 0.0.0.0:8000"
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- ../../src:/code/src
|
Reference in New Issue
Block a user