mirror of
https://github.com/aykhans/series-robot-web.git
synced 2025-04-08 10:24:01 +00:00
Dockerfile split into prod and dev
This commit is contained in:
parent
54d02bd56e
commit
ee6b5e51c1
@ -1,5 +1,3 @@
|
||||
src/celerybeat-schedule
|
||||
src/.env.example
|
||||
src/db.sqlite3
|
||||
config/db/databasepostgresql_env.example
|
||||
**/*.example
|
||||
**/__pycache__
|
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
|
@ -15,8 +15,13 @@ services:
|
||||
restart: always
|
||||
environment:
|
||||
- DJANGO_SETTINGS_MODULE=config.settings.production
|
||||
build: .
|
||||
command: gunicorn --chdir src --bind 0.0.0.0:8000 config.wsgi
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: Docker/Prod/Dockerfile
|
||||
command: >
|
||||
bash -c "python3 src/manage.py makemigrations
|
||||
&& python3 src/manage.py migrate
|
||||
&& gunicorn --chdir src --bind 0.0.0.0:8000 config.wsgi"
|
||||
ports:
|
||||
- "8000:8000"
|
||||
depends_on:
|
@ -15,8 +15,13 @@ services:
|
||||
restart: always
|
||||
environment:
|
||||
- DJANGO_SETTINGS_MODULE=config.settings.production
|
||||
build: .
|
||||
command: gunicorn --chdir src --bind 0.0.0.0:8000 config.wsgi
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: Docker/Prod/Dockerfile
|
||||
command: >
|
||||
bash -c "python3 src/manage.py makemigrations
|
||||
&& python3 src/manage.py migrate
|
||||
&& gunicorn --chdir src --bind 0.0.0.0:8000 config.wsgi"
|
||||
ports:
|
||||
- "8000:8000"
|
||||
depends_on:
|
Loading…
x
Reference in New Issue
Block a user