Add docker, partialy from kers
This commit is contained in:
parent
654ff5814f
commit
2470241f57
|
@ -0,0 +1 @@
|
|||
db.sqlite3
|
|
@ -0,0 +1,12 @@
|
|||
FROM python:3.8.5-alpine3.12
|
||||
|
||||
RUN mkdir code
|
||||
WORKDIR code
|
||||
|
||||
RUN apk add --no-cache gcc musl-dev linux-headers mariadb-dev
|
||||
|
||||
|
||||
COPY requirements.txt requirements.txt
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
COPY . .
|
|
@ -0,0 +1,17 @@
|
|||
version: "3"
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
ports:
|
||||
- "8000:8000"
|
||||
env_file: "web.env"
|
||||
restart: on-failure
|
||||
volumes:
|
||||
- mordor_db:/db.sqlite3
|
||||
- /var/www/mordor/static:/static
|
||||
command: >
|
||||
sh -c "python manage.py collectstatic --no-input
|
||||
python manage.py migrate &&
|
||||
python manage.py runserver 0.0.0.0:8000"
|
||||
volumes:
|
||||
mordor_db:
|
|
@ -0,0 +1,2 @@
|
|||
Django==3.2
|
||||
requests==2.25.1
|
Loading…
Reference in New Issue