-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a431f3c
commit 46d2e74
Showing
1 changed file
with
8 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,8 @@ | ||
FROM python:3.12.4-slim | ||
|
||
WORKDIR /code | ||
|
||
# Install missing libs | ||
RUN apt-get update | ||
|
||
ENV PYTHONUNBUFFERED=1 \ | ||
PYTHONDONTWRITEBYTECODE=1 \ | ||
PIP_NO_CACHE_DIR=off \ | ||
PIP_DISABLE_PIP_VERSION_CHECK=on \ | ||
PIP_DEFAULT_TIMEOUT=100 | ||
|
||
# Install gunicorn | ||
RUN pip install --upgrade pip && \ | ||
pip install gunicorn gunicorn[gevent] | ||
|
||
# Install poetry \ | ||
RUN pip install poetry | ||
|
||
COPY poetry.lock pyproject.toml /code/ | ||
|
||
# Install dependencies | ||
RUN poetry config virtualenvs.create false \ | ||
&& poetry install --no-interaction --no-ansi | ||
|
||
# Copy the rest of the code | ||
COPY . /code/ | ||
|
||
# Exposing Ports | ||
EXPOSE 8000 | ||
|
||
# Environemnt variables | ||
ENV DJANGO_SETTINGS_MODULE=config.settings GUNICORN_BIND=0.0.0.0:8000 GUNICORN_WORKERS=4 GUNICORN_THREADS=2 GUNICORN_TIMEOUT=300 GUNICORN_LOG_LEVEL=info | ||
|
||
# Running Python Application | ||
CMD bash startup.sh | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM node:18-alpine | ||
WORKDIR /app | ||
COPY . . | ||
RUN yarn install --production | ||
CMD ["node", "src/index.js"] | ||
EXPOSE 3000 |