-
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
ankuru
committed
Jul 11, 2024
1 parent
c9b4343
commit 4d81a74
Showing
3 changed files
with
41 additions
and
0 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,8 @@ | ||
# Ignore everything | ||
* | ||
|
||
# Allow files | ||
!discord_memo/** | ||
!requirements.txt | ||
!pyproject.toml | ||
!poetry.lock |
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,14 @@ | ||
FROM python:3.11-slim | ||
|
||
ENV PYTHONUNBUFFERED=1 | ||
ENV PYTHONPATH="/src" | ||
|
||
WORKDIR /src | ||
RUN pip install poetry | ||
|
||
COPY pyproject.toml* poetry.lock* ./ | ||
RUN poetry config virtualenvs.in-project true | ||
RUN if [ -f pyproject.toml ]; then poetry install --no-root; fi | ||
|
||
COPY ./discord_memo /src/discord_memo | ||
ENTRYPOINT ["poetry", "run", "python3", "/src/discord_memo/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
services: | ||
discord-memo: | ||
container_name: discord-memo-dev | ||
tty: true | ||
|
||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
|
||
develop: | ||
watch: | ||
- action: sync | ||
path: ./discord_memo | ||
target: /src/discord_memo | ||
- action: rebuild | ||
path: pyproject.toml | ||
- action: rebuild | ||
path: ./discord_memo/ | ||
env_file: .env |