Skip to content

Commit

Permalink
Merge pull request #2 from abi23ohm/docker
Browse files Browse the repository at this point in the history
build: dockerfile
  • Loading branch information
moritzlerch authored Jul 6, 2023
2 parents d123eff + 8ab986e commit 28a70a6
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
.ropeproject/

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo

# Django stuff:
*.log
data/

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Ipython Notebook
.ipynb_checkpoints

# python venv
venv/
22 changes: 22 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Docker deployment
on: push
jobs:
deploy-docker:
name: Deploy to docker
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
file: ./Dockerfile
tags: ghcr.io/${{ github.repository }}:latest
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM alpine

COPY . /plugins/pretix_manualseats/
13 changes: 13 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,16 @@ Released under the terms of the Apache License 2.0

.. _pretix: https://github.com/pretix/pretix
.. _pretix development setup: https://docs.pretix.eu/en/latest/development/setup.html


## Internal Usage

```Dockerfile
FROM ghcr.io/abi23ohm/pretix-manualseats as pretix_manualseats
FROM pretix...
...
COPY --from=pretix_manualseats /plugins/pretix_manualseats /plugins/pretix_manualseats
RUN pip install -e /plugins/pretix_manualseats
```

0 comments on commit 28a70a6

Please sign in to comment.