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

Updated the Backend's Deployment #657

Merged
merged 41 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0c43673
removed webpack dependency and background_jobs endpoint
TheMrSheldon Jul 29, 2024
297c54f
removed legacy deployment stuff and began work on new production dock…
TheMrSheldon Jul 29, 2024
08c5a25
added building the application to the publish workflow
TheMrSheldon Jul 31, 2024
9de413b
merged
TheMrSheldon Jul 31, 2024
363db8f
updated publish workflow to run on push for now
TheMrSheldon Jul 31, 2024
30643b5
made index.html paths relative
TheMrSheldon Jul 31, 2024
2039d85
appended tira-frontend to all resource paths in the compiled frontend
TheMrSheldon Jul 31, 2024
5f9714b
set base path explicitly
TheMrSheldon Jul 31, 2024
87185fe
added tfr-static prefix
TheMrSheldon Jul 31, 2024
c40e599
added workaround for disraptor
TheMrSheldon Jul 31, 2024
96430b4
test
TheMrSheldon Jul 31, 2024
60a44ae
rewoked last changes
TheMrSheldon Jul 31, 2024
450c3a1
updated dockerfile of frontend
TheMrSheldon Jul 31, 2024
28648d3
fixed frontend dockerfile
TheMrSheldon Jul 31, 2024
b5ab373
removed extractRole for fetchUserInfo
TheMrSheldon Aug 1, 2024
c19958a
removed extractOrganizerTeams
TheMrSheldon Aug 1, 2024
d8608f2
elaborated TODO Comment
TheMrSheldon Aug 1, 2024
fa14f59
fixed typehints
TheMrSheldon Aug 1, 2024
707a12e
removed unused utils functions
TheMrSheldon Aug 1, 2024
f5d629c
merged from development
TheMrSheldon Sep 3, 2024
b8e9c60
renamed application module to tira_app and updated production container
TheMrSheldon Sep 3, 2024
32f7060
minor fixes to ci
TheMrSheldon Sep 3, 2024
c6e92ec
more configurable TIRA_ROOT and TIRA_CONF
TheMrSheldon Sep 6, 2024
c8f81e5
cleaned the settings.py and settings-test.py up a bit
TheMrSheldon Sep 6, 2024
74ce9f7
consolidated tira-application-config.*.yml and improved settings.py f…
TheMrSheldon Sep 6, 2024
af24afd
removed src/tira_app/static and fixed TIRA_DEBUG handling
TheMrSheldon Sep 6, 2024
24d2d5c
configured TIRE_CONFIG appropriately in CI and dockerfile for make setup
TheMrSheldon Sep 6, 2024
9f82402
another problem found
TheMrSheldon Sep 6, 2024
ac2b27a
dockerfile.prod runs make setup in debug mode
TheMrSheldon Sep 6, 2024
f49dd0d
automatic migration; extended configuration via environment variables…
TheMrSheldon Sep 13, 2024
c95d7c3
fixed python-gitlabto 4.10.0
TheMrSheldon Sep 13, 2024
95a9002
added helpful tools to production container
TheMrSheldon Sep 19, 2024
fbf25cd
fixed wrong path
TheMrSheldon Sep 19, 2024
3c2ccb4
fixed django to 5.0.9
TheMrSheldon Sep 19, 2024
6aab812
oops
TheMrSheldon Sep 19, 2024
18025a0
heldenhaft
TheMrSheldon Sep 19, 2024
45f99f3
final deployment adjustments
TheMrSheldon Sep 19, 2024
5c458fc
made django_secret and discourse_api_key configurable via env
TheMrSheldon Sep 19, 2024
9f3141d
updated deployment documentation
TheMrSheldon Sep 19, 2024
e43bb69
uwsgi uses port 8080
TheMrSheldon Sep 19, 2024
5d56971
the info endpoint now fetches the actual tira version
TheMrSheldon Sep 19, 2024
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
10 changes: 6 additions & 4 deletions .devcontainer/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ ENV PIP_BREAK_SYSTEM_PACKAGES 1
USER root
RUN apt-get update && apt-get install -y python3 python3-pip python3-dev pkg-config default-libmysqlclient-dev \
libpcre3-dev
# Create a dummy secret
COPY <<EOF /etc/discourse/client-api-key
I am so secret
EOF

# Environment Variables for TIRA Configuration:
ENV TIRA_ROOT=/workspaces/tira/model/src
ENV TIRA_CONFIG=/workspaces/tira/application/config/tira-application-config.yml
ENV TIRA_DEBUG=true
ENV DISCOURSE_API_KEY="I am so secret"

########################################################################################################################
# Client #
Expand Down
25 changes: 22 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Publish Docker images
on:
release:
types: [published]
# TODO: The run on push should be removed (or commented out) in the future. It is here only for testing purposes
# while the deployment is WiP
push:
branches:
- updated_backend_deployment

env:
REGISTRY: ghcr.io
Expand All @@ -24,7 +29,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
id: meta-frontend
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/tira-io/tira-frontend
Expand All @@ -34,5 +39,19 @@ jobs:
context: ${{ github.workspace }}/frontend
file: ${{ github.workspace }}/frontend/Dockerfile.prod
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta-frontend.outputs.tags }}
labels: ${{ steps.meta-frontend.outputs.labels }}

- name: Extract metadata (tags, labels) for Docker
id: meta-backend
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/tira-io/tira-backend
- name: Publish tira-backend image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: ${{ github.workspace }}/
file: ${{ github.workspace }}/application/Dockerfile.prod
push: true
tags: ${{ steps.meta-backend.outputs.tags }}
labels: ${{ steps.meta-backend.outputs.labels }}
12 changes: 7 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
python-version: ["3.9", "3.10"]
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -20,14 +20,16 @@ jobs:
run: |
# Install tira from the repository since the pip version may not be up-to-date enough.
# The install musst be editable (-e) since importing from tira fails otherwise
pip3 install -e .[dev,test]
pip3 install .[dev,test]
- name: Install dependencies
working-directory: ${{github.workspace}}/application
run: |
# Create a dummy DISRAPTOR_API_KEY
sudo bash -c 'mkdir -p "/etc/discourse/" && echo "I am so secret" > "/etc/discourse/client-api-key"'
pip3 install -e .[dev,test]
pip3 install .[dev,test]
make setup
env:
TIRA_ROOT: ${{github.workspace}}/model/src
TIRA_CONFIG: ${{github.workspace}}/application/config/tira-application-config.yml
DISCOURSE_API_KEY: "I am so secret"
- name: Run backend tests
working-directory: ${{github.workspace}}/application/test
run: pytest
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<a href="https://tira.io">
<img alt="Deployment" src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fwww.tira.io%2Finfo&query=%24.version&prefix=v.&label=tira.io"/>
</a>
<a href="https://github.com/tira-io/tira/actions/workflows/run-all-tests.yml">
<img alt="Tests" src="https://github.com/tira-io/tira/actions/workflows/run-all-tests.yml/badge.svg"/>
<a href="https://github.com/tira-io/tira/actions/workflows/tests.yml">
<img alt="Tests" src="https://github.com/tira-io/tira/actions/workflows/tests.yml/badge.svg"/>
</a>
<a href="https://github.com/tira-io/tira/actions/workflows/linters.yml">
<img alt="Linters" src="https://github.com/tira-io/tira/actions/workflows/linters.yml/badge.svg"/>
Expand Down
8 changes: 0 additions & 8 deletions application/.devcontainer.json

This file was deleted.

Loading
Loading