Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
hepplerj committed May 23, 2024
2 parents 0df7515 + e4975d9 commit b29aa51
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 8 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Build and Publish Docker Image"

on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- "**"

jobs:
workflow:
uses: chnm/.github/.github/workflows/django--build-publish.yml@main
secrets: inherit
with:

container-registry: "ghcr.io"
container-image-name: "winterthur"

django-context-root: "."

website-devl-fqdn: "dev.winterthur.rrchnm.org"
website-prod-fqdn: "dev.winterthur.rrchnm.org"
19 changes: 11 additions & 8 deletions docker-compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
---
services:
app:
build: .
image: "rrchnm/winterthur"
container_name: "winterthur-app"
image: ghcr.io/{{ template.git.package.image_name }}:{{ template.git.package.tag }}
container_name: {{ template.name }}_app
restart: unless-stopped
env_file: .env
ports:
Expand All @@ -17,13 +16,14 @@ services:
poetry run python3 manage.py collectstatic --no-input &&
poetry run python3 manage.py runserver 0.0.0.0:8000"
volumes:
- dj-data:/app/staticfiles
- dj-static:/app/staticfiles
- dj-media:/app/media
depends_on:
db:
condition: service_healthy
db:
image: postgres:12
container_name: "winterthur-db"
container_name: {{ template.name }}_db
restart: unless-stopped
env_file: .env
volumes:
Expand All @@ -36,9 +36,12 @@ services:

# external volumes managed and defined by ansible
volumes:
dj-data:
name: "winterthur_app-vol"
dj-static:
name: "{{ template.name }}_app-static-vol"
external: true
dj-media:
name: "{{ template.name }}_app-media-vol"
external: true
pg-data:
name: "winterthur_db-vol"
name: "{{ template.name }}_db-vol"
external: true

0 comments on commit b29aa51

Please sign in to comment.