Skip to content

Commit

Permalink
Merge pull request #9 from chnm/feature/cicd-workflows
Browse files Browse the repository at this point in the history
Merge feature/cicd-workflows into main
  • Loading branch information
qtrinh2 authored Nov 7, 2024
2 parents 87fff5d + 70ee738 commit c6ca420
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Build and Publish, Deploy Docker Image"

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

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

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

django-context-root: "."

website-devl-fqdn: "dev.civilwargraffiti.org"
website-prod-fqdn: "civilwargraffiti.org"

deploy:
uses: chnm/.github/.github/workflows/django--deploy.yml@main
needs: [build-publish]
secrets: inherit
with:
website-devl-fqdn: "dev.civilwargraffiti.org"
website-prod-fqdn: "civilwargraffiti.org"
5 changes: 0 additions & 5 deletions docker-compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ services:
- DB_NAME={{ template.env.db_name }}
- DB_USER={{ template.env.db_user }}
- DB_PASS={{ template.env.db_pass }}
- OBJ_STORAGE={{ template.env.obj_storage }}
- OBJ_STORAGE_ACCESS_KEY_ID={{ template.env.obj_storage_access_key_id }}
- OBJ_STORAGE_SECRET_ACCESS_KEY={{ template.env.obj_storage_secret_access_key }}
- OBJ_STORAGE_BUCKET_NAME={{ template.env.obj_storage_bucket_name }}
- OBJ_STORAGE_ENDPOINT_URL={{ template.env.obj_storage_endpoint_url }}
command: >
sh -c "poetry run python3 manage.py migrate &&
poetry run python3 manage.py runserver 0.0.0.0:8000"
Expand Down

0 comments on commit c6ca420

Please sign in to comment.