-
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
43d4ff1
commit 4dfa81b
Showing
5 changed files
with
48 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Use an official Python runtime as a parent image | ||
# Use bullseye with Python pre-installed | ||
FROM python:3.9-bullseye | ||
|
||
# Set the working directory to /app | ||
WORKDIR /app | ||
|
||
# Copy all the things... | ||
ADD . /app/ | ||
|
||
# Add essential packages and psycopg2 prerequisites then upgrade pip | ||
RUN apt-get update && apt-get install -y \ | ||
gcc \ | ||
python3-dev \ | ||
libpq-dev \ | ||
&& pip install --upgrade pip | ||
|
||
# Install python packages and remove unnecessary packages | ||
RUN pip install --no-cache-dir -r requirements.txt \ | ||
&& apt-get autoremove -y gcc python3-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Make Log file | ||
RUN mkdir -p /app/logs | ||
|
||
|
||
# Env Variables | ||
ENV APP_PORT=3000 | ||
|
||
# Expose APP_PORT of the container to the outside | ||
EXPOSE $APP_PORT | ||
|
||
# Run the command to start things... | ||
CMD ["python", "app/main.py"] |
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
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
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
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