Docker deployment: fix dockerfile

This commit is contained in:
vas3k 2022-03-29 11:03:15 +02:00
parent c6052332c1
commit e2721ff00e
4 changed files with 13 additions and 10 deletions

View File

@ -1,20 +1,28 @@
FROM python:3.7-slim-buster
FROM ubuntu:20.04
ENV MODE dev
ENV DEBIAN_FRONTEND=noninteractive
ARG requirements=requirements.txt
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install --no-install-recommends -yq \
python3 \
python3-pip \
gcc \
libc-dev \
libpq-dev \
make \
cron \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . /app
COPY etc/crontab /etc/crontab
RUN chmod 600 /etc/crontab
ADD . /app
RUN pip install --no-cache-dir -e . \

View File

@ -43,9 +43,6 @@ migrate: ## Migrate database to the latest version
mypy: ## Check types with mypy
mypy $(PROJECT_NAME)
run: ## Runs dev server
python3 manage.py runserver
telegram:
python3 setup_telegram.py
@ -66,6 +63,5 @@ test-requirements: ## Install requirements to run tests
lint \
migrate \
mypy \
run \
test-ci \
test-requirements

View File

@ -2,7 +2,7 @@ version: "3"
services:
app: &app
image: ghcr.io/vas3k/infomate:${GITHUB_SHA:-latest}
command: make docker-run-production
command: make docker-run-app
container_name: infomate_app
environment:
- MODE=production

View File

@ -7,10 +7,9 @@ pillow==9.0.1
awesome-slugify>=1.6.5
requests>=2.22.0
beautifulsoup4==4.6.2
pyyaml==5.2
pyyaml==5.4
feedparser==6
sentry-sdk==0.14.1
nltk==3.4.5
nltk==3.6.6
newspaper3k>=0.2.8
django-bleach==1.0.0