feat: Add Dockerfile for development and deployment

pull/2/head
Georg Krause 2023-01-12 16:31:58 +01:00
parent 0fca58810a
commit d9d3f02fda
Signed by: gcrkrause
GPG Key ID: 2970D504B2183D22
2 changed files with 29 additions and 0 deletions

17
DEVELOPMENT.md Normal file
View File

@ -0,0 +1,17 @@
# Development Guide
## Docker
In order to have a common development environment, its nice to use docker. Its quite easy. To build a new image, simply run
`docker build . -t mastodon_blocklist_deploy`
Now you can execute any commands using
`docker run --rm mastodon_blocklist_deploy --help`
If you want to avoid building new containers for each change, simply mount your code into the container using
`docker run --rm -v $(pwd):/app mastodon_blocklist_deploy`
Please be aware that changes to the package itself require a rebuild anyways.

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
COPY pyproject.toml poetry.lock README.md /app/
COPY mastodon_blocklist_deploy /app/mastodon_blocklist_deploy
WORKDIR /app
ENTRYPOINT ["mastodon_blocklist_deploy"]
RUN pip install -e .