Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs(CI): workflows, artifacts, context; pull legacy from registry #8

Merged
merged 3 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/build.plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ on:
- .github/workflows/build.plugins.yml
- context/plugins

release:
types: [published]

workflow_call:
inputs:
ref:
Expand Down Expand Up @@ -53,7 +50,7 @@ jobs:
file: Dockerfile.debian
build-args: |
BASE_IMAGE=ghcr.io/allmende/pretalx
BASE_TAG=next
BASE_TAG=latest
secrets: inherit
call-build-and-push-ref:
name: Call tagged image build
Expand All @@ -67,5 +64,5 @@ jobs:
ref: ${{ inputs.ref }}
build-args: |
BASE_IMAGE=ghcr.io/allmende/pretalx
BASE_TAG=next
BASE_TAG=latest
secrets: inherit
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,20 @@ This repository is used for building Container images from the source manifests

### CI

We provide a CI manifest to build and push container images to Docker Hub (`docker.io`) and to the GitHub Container Registry (`ghcr.io`).
We provide CI manifests to build and push container images to Docker Hub (`docker.io`) and to the GitHub Container Registry (`ghcr.io`).

Find it in [`.github/workflows/build.yml`](.github/workflows/build.yml).
Find them in [`.github/workflows/`](.github/workflows/).

- `build-and-push.yml`, a generic build and push workflow that is called by other workflows and releases artifacts into Docker Hub and the GitHub Container Registry.
- `build.default.yml`, builds the `default` context into a `pretalx` image.
- `build.plugins.yml`, builds the `plugins` context into a `pretalx-extended` image.

The artifacts can be retrieved from:

- [pretalx/pretalx Tags | Docker Hub](https://hub.docker.com/r/pretalx/pretalx/tags)
- [pretalx/pretalx-extended Tags | Docker Hub](https://hub.docker.com/r/pretalx/pretalx-extended/tags)
- [pretalx versions · pretalx · GHCR](https://github.com/pretalx/pretalx-docker/pkgs/container/pretalx/versions)
- [pretalx-extended versions · pretalx · GHCR](https://github.com/pretalx/pretalx-docker/pkgs/container/pretalx-extended/versions)

### Setting up the build environment

Expand Down
4 changes: 3 additions & 1 deletion compose/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
services:
app: &build-default
build: ./context/default
build:
context: ./context/default
dockerfile: Dockerfile.debian
worker: *build-default
cron: *build-default
migrations: *build-default
5 changes: 3 additions & 2 deletions compose/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ services:
image: pretalx-${FQDN}
build:
context: ./context/plugins
dockerfile: Dockerfile.debian
args:
PRETALX_IMAGE: ${PRETALX_IMAGE}
PRETALX_TAG: ${PRETALX_TAG}
BASE_IMAGE: ${PRETALX_IMAGE}
BASE_TAG: ${PRETALX_TAG}
worker: *plugins-default
cron: *plugins-default
migrations: *plugins-default
1 change: 0 additions & 1 deletion context/default/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ RUN apt update && \
libpq-dev \
locales \
libmemcached-dev \
build-essential \
locales \
nodejs \
npm \
Expand Down
56 changes: 28 additions & 28 deletions legacy/docker-compose.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ services:


app:
# image: ${PRETALX_IMAGE}:${PRETALX_TAG}
image: pretalx-${FQDN}
build:
context: ./context/plugins
args:
PRETALX_IMAGE: ${PRETALX_IMAGE}
PRETALX_TAG: ${PRETALX_TAG}
image: ${PRETALX_IMAGE}:${PRETALX_TAG}
# image: pretalx-${FQDN}
# build:
# context: ./context/plugins
# args:
# BASE_IMAGE: ${PRETALX_IMAGE}
# BASE_TAG: ${PRETALX_TAG}
command: gunicorn
restart: unless-stopped

Expand Down Expand Up @@ -83,13 +83,13 @@ services:
PRETALX_DB_PASS: ${POSTGRES_PASSWORD}

worker:
# image: ${PRETALX_IMAGE}:${PRETALX_TAG}
image: pretalx-${FQDN}
build:
context: ./context/plugins
args:
PRETALX_IMAGE: ${PRETALX_IMAGE}
PRETALX_TAG: ${PRETALX_TAG}
image: ${PRETALX_IMAGE}:${PRETALX_TAG}
# image: pretalx-${FQDN}
# build:
# context: ./context/plugins
# args:
# BASE_IMAGE: ${PRETALX_IMAGE}
# BASE_TAG: ${PRETALX_TAG}
command: celery
restart: unless-stopped

Expand Down Expand Up @@ -122,13 +122,13 @@ services:
PRETALX_DB_PASS: ${POSTGRES_PASSWORD}

cron:
# image: ${PRETALX_IMAGE}:${PRETALX_TAG}
image: pretalx-${FQDN}
build:
context: ./context/plugins
args:
PRETALX_IMAGE: ${PRETALX_IMAGE}
PRETALX_TAG: ${PRETALX_TAG}
image: ${PRETALX_IMAGE}:${PRETALX_TAG}
# image: pretalx-${FQDN}
# build:
# context: ./context/plugins
# args:
# BASE_IMAGE: ${PRETALX_IMAGE}
# BASE_TAG: ${PRETALX_TAG}
command: cron
user: root
init: true
Expand Down Expand Up @@ -159,13 +159,13 @@ services:
PRETALX_DB_PASS: ${POSTGRES_PASSWORD}

migrations:
# image: ${PRETALX_IMAGE}:${PRETALX_TAG}
image: pretalx-${FQDN}
build:
context: ./context/plugins
args:
PRETALX_IMAGE: ${PRETALX_IMAGE}
PRETALX_TAG: ${PRETALX_TAG}
image: ${PRETALX_IMAGE}:${PRETALX_TAG}
# image: pretalx-${FQDN}
# build:
# context: ./context/plugins
# args:
# BASE_IMAGE: ${PRETALX_IMAGE}
# BASE_TAG: ${PRETALX_TAG}
command: migrate
restart: "no"

Expand Down