From 99cad1c720f323ebb1fd0696af516b26131670b3 Mon Sep 17 00:00:00 2001 From: beaussan Date: Tue, 12 Jan 2021 12:05:45 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 81ed567..ca9d78c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,17 @@ -FROM node:dubnium -WORKDIR /nest-server -COPY . . -RUN yarn install -CMD ["yarn", "start"] \ No newline at end of file +FROM python:3.7.6-alpine3.11 + +RUN apk update && apk add py3-gunicorn postgresql-dev libffi-dev python3-dev musl-dev build-base + +COPY ./requirements/prod.txt /app/requirements.txt + +WORKDIR /app + +ENV CONDUIT_SECRET='something-really-secret' FLASK_APP='app/autoapp.py' FLASK_DEBUG=0 DATABASE_URL=postgres://otnecihopmfiee:eec126400a7527061a9f30075160d2efcc06eeab490ef91bf1b7ccca2416ab23@ec2-174-129-33-156.compute-1.amazonaws.com:5432/d6ihee8p5iu77g + +RUN pip install -r /app/requirements.txt + +COPY . ./ + +EXPOSE 5000 + +CMD ["gunicorn", "autoapp:app", "-b", "0.0.0.0:5000", "-w", "3"]