-
Notifications
You must be signed in to change notification settings - Fork 3
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
700f701
commit cd177d4
Showing
7 changed files
with
201 additions
and
137 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,44 @@ | ||
{ | ||
"name": "dune-sync development container", | ||
"dockerComposeFile": "../docker-compose.yml", | ||
"service": "app", | ||
"features": { | ||
"ghcr.io/devcontainers/features/python:latest": { | ||
"installTools": false, | ||
"version": "3.13" | ||
} | ||
}, | ||
"customizations": { | ||
"jetbrains": { | ||
"settings": { | ||
"com.intellij:app:EditorSettings.is_ensure_newline_at_eof": true, | ||
"com.intellij:app:GeneralSettings.searchInBackground": true, | ||
"Git4Idea:app:Git-Application-Settings.myPathToGit": "/usr/bin/git", | ||
"org.jetbrains.plugins.github:app:GithubSettings.clone_git_using_ssh": true, | ||
"com.intellij:app:Vcs-Log-App-Settings.show_changes_from_parents": true, | ||
} | ||
}, | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-python.black-formatter", | ||
"charliermarsh.ruff" | ||
], | ||
"settings": { | ||
"python.defaultInterpreterPath": "/usr/local/bin/python", | ||
"python.linting.enabled": true, | ||
"python.linting.pylintEnabled": false, | ||
"python.linting.ruffEnabled": true, | ||
"python.formatting.provider": "black", | ||
"editor.formatOnSave": true | ||
} | ||
} | ||
}, | ||
"postCreateCommand": "poetry install --no-root", | ||
"containerEnv": { | ||
"PYTHONPATH": "../", | ||
}, | ||
"remoteEnv": { | ||
"PYTHONPATH": "../" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,30 @@ | ||
FROM python:3.13-alpine | ||
# Base | ||
FROM python:3.13-slim AS base | ||
|
||
# Install system dependencies and poetry | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends curl bash git && \ | ||
pip install poetry && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN python -m pip install poetry | ||
RUN mkdir /app | ||
RUN apk add bash | ||
COPY src /app/src | ||
COPY poetry.lock /app/poetry.lock | ||
COPY pyproject.toml /app/pyproject.toml | ||
WORKDIR /app | ||
COPY src /app/src | ||
COPY pyproject.toml poetry.lock* ./ | ||
RUN POETRY_VIRTUALENVS_CREATE=false python -m poetry install --no-dev | ||
|
||
# Dev | ||
FROM base AS dev | ||
RUN POETRY_VIRTUALENVS_CREATE=false python -m poetry install | ||
|
||
#CMD ["python", "-m", "src.main"] | ||
|
||
# Prod | ||
FROM python:3.13-alpine AS prod | ||
|
||
COPY --from=base /app/src /app/src/ | ||
COPY --from=base /usr/local/lib/python3.13/site-packages /usr/local/lib/python3.13/site-packages | ||
|
||
WORKDIR /app | ||
|
||
USER 1000 | ||
ENTRYPOINT [ "python", "-m" , "src.main"] | ||
ENTRYPOINT [ "/usr/local/bin/python", "-m" , "src.main"] |
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,30 @@ | ||
# Base | ||
FROM python:3.13-slim AS base | ||
|
||
# Install system dependencies and poetry | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends curl bash git && \ | ||
pip install poetry && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /app | ||
COPY src /app/src | ||
COPY pyproject.toml poetry.lock* ./ | ||
RUN POETRY_VIRTUALENVS_CREATE=false python -m poetry install --no-dev | ||
|
||
# Dev | ||
FROM base AS dev | ||
RUN POETRY_VIRTUALENVS_CREATE=false python -m poetry install | ||
|
||
CMD ["python", "-m", "src.main"] | ||
|
||
# Prod | ||
FROM python:3.13-alpine AS prod | ||
|
||
COPY --from=base /app/src /app/src/ | ||
COPY --from=base /usr/local/lib/python3.13/site-packages /usr/local/lib/python3.13/site-packages | ||
|
||
WORKDIR /app | ||
|
||
USER 1000 | ||
ENTRYPOINT [ "/usr/local/bin/python", "-m" , "src.main"] |
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
Oops, something went wrong.