Revert "build: slim down the docker container (#60)"

This reverts commit 80b858c5785468003c4df010ba206be2407c616e.
This commit is contained in:
Alexandre Teles 2023-10-19 18:25:33 -03:00
parent 48500d58db
commit e189c8264f
No known key found for this signature in database
GPG Key ID: DB1C7FA46B1007F0
5 changed files with 5 additions and 37 deletions

View File

@ -1,6 +0,0 @@
.idea
.devcontainer
.git
.gitignore
.github
.vscode

2
.gitignore vendored
View File

@ -157,7 +157,7 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
#.idea/
# custom
env.sh

View File

@ -1,36 +1,12 @@
## Build dependencies
FROM python:3.11-slim as dependencies
WORKDIR /usr/src/app
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc git \
&& rm -rf /var/lib/apt/lists/*
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
COPY requirements.txt .
RUN pip install -r requirements.txt
## Image
FROM python:3.11-slim
ARG GITHUB_TOKEN
ENV GITHUB_TOKEN $GITHUB_TOKEN
WORKDIR /usr/src/app
RUN apt-get update && \
apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="/opt/venv/bin:$PATH"
COPY --from=dependencies /opt/venv /opt/venv
COPY . .
VOLUME persistance
CMD docker/run-backend.sh
HEALTHCHECK CMD docker/run-healthcheck.sh
EXPOSE 8000
CMD [ "python3", "-m" , "sanic", "app:app", "--fast", "--access-logs", "--motd", "--noisy-exceptions", "-H", "0.0.0.0"]

View File

@ -1 +0,0 @@
python3 -m sanic /usr/src/app --fast --access-logs --motd --noisy-exceptions -H 0.0.0.0

View File

@ -1 +0,0 @@
curl --fail http://0.0.0.0:8000/docs