Skip to content

Commit

Permalink
Merge pull request #9 from FilGoodInc/compressed_oxygencs
Browse files Browse the repository at this point in the history
compressed to the max
  • Loading branch information
olry authored Jul 4, 2024
2 parents 3b6e391 + 642c52c commit e039009
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 36 deletions.
34 changes: 9 additions & 25 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,13 @@
# Ignore Python cache files
.git
__pycache__
*.pyc
*.pyo

# Ignore Git files
.git
.gitignore

# Ignore Dockerfile and .dockerignore
Dockerfile
.dockerignore

# Ignore local configuration files
*.local
*.pyd
*.db
*.sqlite
*.log

# Ignore unit test and coverage results
*.coverage
.coverage
.coverage.*

# Ignore pytest cache
.pytest_cache

# Ignore build artifacts
build/
dist/
*.egg-info/
.env.local
.DS_Store
node_modules
build
dist
27 changes: 21 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
FROM python:3.8-slim
FROM python:3.8-alpine AS build

WORKDIR /app

COPY . /app

RUN pip install --upgrade pip \
&& pip install pipenv
RUN apk add --no-cache --virtual .build-deps \
build-base linux-headers gcc musl-dev libffi-dev postgresql-dev libpq && \
pip install --upgrade pip && \
pip install pipenv

COPY Pipfile Pipfile.lock ./
RUN PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy --ignore-pipfile

COPY .env /app/.env
COPY . .

FROM python:3.8-alpine

WORKDIR /app

RUN apk add --no-cache libpq && \
pip install --upgrade pip && \
pip install pipenv

COPY --from=build /app /app

ENV PIPENV_VENV_IN_PROJECT=1
ENV PATH="/app/.venv/bin:$PATH"

COPY .env /app/.env

EXPOSE 5000

CMD ["pipenv", "run", "python", "src/main.py"]
2 changes: 0 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@ python_version = "3.8"

[scripts]
start = "python src/main.py"
test = "# To implement"
lint = "# To implement"
6 changes: 3 additions & 3 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e039009

Please sign in to comment.