-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(workflows): Improve deployment quality. (#15)
chore: re-write workflow + docker deployment
- Loading branch information
1 parent
9f748b6
commit 07cf303
Showing
7 changed files
with
108 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: deploy_database_production | ||
concurrency: deploy_database_production | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
secrets: | ||
DATABASE_USERNAME: | ||
required: true | ||
DATABASE_PASSWORD: | ||
required: true | ||
|
||
jobs: | ||
upgrade: | ||
runs-on: self-hosted | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Upgrade database | ||
run: docker-compose up -d backend_upgrade | ||
- name: Stop container | ||
run: docker-compose stop -d backend_upgrade | ||
- name: Remove image | ||
run: docker rmi elki_97413/onisep_backend_update:latest | ||
env: | ||
DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }} | ||
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM python:slim-buster AS build | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
LABEL authors="Angel-Dijoux" | ||
|
||
WORKDIR /app | ||
|
||
ENV JWT_SECRET_KEY=UNUSED | ||
ENV ENV=production | ||
ENV FLASK_APP=src | ||
|
||
|
||
COPY requirements.txt Pipfile Pipfile.lock ./ | ||
|
||
RUN pip install --user --no-cache-dir pipenv | ||
|
||
COPY . . | ||
|
||
ENV PATH="${PATH}:/root/.local/bin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.