-
Notifications
You must be signed in to change notification settings - Fork 1
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
b1a1b4d
commit bbc8b4f
Showing
20 changed files
with
12 additions
and
232 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,24 +1,10 @@ | ||
# Use a suitable base-image. | ||
FROM python:3-alpine | ||
|
||
# Create a seperate user and chown new directories if necessary | ||
RUN addgroup --system service | ||
RUN adduser --system --ingroup service --uid 1000 service | ||
|
||
# Create our mapped data volume endpoint | ||
RUN mkdir /data/ | ||
|
||
# Copy our entrypoint.sh and make it executable | ||
COPY entrypoint.sh / | ||
RUN chmod +x /entrypoint.sh | ||
FROM python:3.10.9-slim | ||
|
||
# Copy our service | ||
COPY src/ /service/ | ||
COPY src/ /src/ | ||
COPY main.py / | ||
|
||
# Change the working directory. | ||
WORKDIR /service/ | ||
# Expose the service's port | ||
EXPOSE 8000 | ||
RUN pip install -r src/requirements.txt | ||
|
||
# Run the service | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD gunicorn --bind 0.0.0.0:5000 main:app |
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,11 +1,9 @@ | ||
version: '3' | ||
services: | ||
n0t3b00k: | ||
build: . | ||
# The code should be copied into the container using COPY. | ||
# Mount the data folder writable, so that information can be persisted across restarts. | ||
service: | ||
build: | ||
context: . | ||
volumes: | ||
- ./data/:/data:rw | ||
# Define the port mapping (external:internal port) | ||
- ./instance:/instance | ||
# change port later | ||
ports: | ||
- "2323:8000" | ||
- "5000:5000" |
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,4 +1,4 @@ | ||
from website import create_app | ||
from src import create_app | ||
|
||
app = create_app() | ||
|
||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.