-
Notifications
You must be signed in to change notification settings - Fork 0
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
4f5d172
commit b59d7d4
Showing
1 changed file
with
12 additions
and
14 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,14 +1,12 @@ | ||
FROM python:3.10 | ||
# Installing dependencies for running a python application | ||
RUN apt-get update && apt-get install -y python3 python3-pip postgresql-client libpq-dev | ||
# Install pipenv | ||
RUN pip3 install poetry | ||
# Setting the working directory | ||
WORKDIR /app | ||
# Install pipenv dependencies | ||
COPY pyproject.toml ./ | ||
RUN poetry install --no-root | ||
# Copying our application into the container | ||
COPY todo todo | ||
# Adding a delay to our application startup | ||
CMD ["bash", "-c", "sleep 10 && poetry run flask --app todo run --host 0.0.0.0 --port 6400"] | ||
FROM python:3.10 | ||
# Install pipenv | ||
RUN pip3 install poetry | ||
# Setting the working directory | ||
WORKDIR /app | ||
# Install pipenv dependencies | ||
COPY pyproject.toml ./ | ||
RUN poetry install --no-root | ||
# Copying our application into the container | ||
COPY todo todo | ||
# Running our application | ||
CMD ["poetry", "run", "flask", "--app", "todo", "run", "--host", "0.0.0.0", "--port", "6400"] |