refactor repo

This commit is contained in:
2024-03-14 10:20:30 +01:00
parent de18726abb
commit 26b59425b7
32 changed files with 688 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
# Application Flask de citations inspirantes avec sessions et Redis
## Groupe
- Yves-Robert ESTRADA
- Mustapha AIT HAMOU
- Sinclair BALIVET
- Pauline SRIFI

View File

@@ -0,0 +1,23 @@
name: Gitea Actions for feature
run-name: ${{ gitea.actor }} testing jobs
on:
push:
branches:
- features/*
jobs:
Tests-Actions:
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
github-server-url: 'http://localhost:3000'
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
cd app
pip3 install -r requirements.test.txt
- name: "Testing..."
run: cd app && python3 -m unittest discover -s tests

Submodule backend_part1/rendu_inspirasite/ispirasite added at 488ccfb3cf

View File

@@ -0,0 +1,43 @@
name: Gitea Actions for prod
run-name: ${{ gitea.actor }} deploy prod
on:
push:
tags:
- 'v*'
jobs:
Deploy-Staging-Actions:
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
github-server-url: http://localhost:3000
- name: Login to the registry
uses: docker/login-action@v2
with:
registry: http://localhost:3000
username: ${{ github.repository_owner }}
password: ${{ secrets.token }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: ./app
file: ./app/Dockerfile
platforms: linux/amd64
push: true
tags: localhost:3000/${{ gitea.repository }}:latest
- name: Generate stack yml for deployment
uses: nowactions/envsubst@v1
with:
input: ./stack_prod.tpl.yml
output: ./stack_prod.yml
env:
CACHE_HOST: "${{ vars.CACHE_HOST }}"
CACHE_PORT: "${{ vars.CACHE_PORT }}"
APP_PORT: "${{ vars.APP_PORT }}"
SECRET_KEY: "${{ vars.SECRET_KEY }}"
TTL: "${{ vars.TTL }}"
- name: Deploy
run: docker stack deploy -c ./stack_prod.yml inspirasite_prod

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,43 @@
name: Gitea Actions for staging
run-name: ${{ gitea.actor }} deploy staging
on:
push:
branches:
- main
jobs:
Deploy-Staging-Actions:
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
github-server-url: http://localhost:3000
- name: Login to the registry
uses: docker/login-action@v2
with:
registry: http://localhost:3000
username: ${{ github.repository_owner }}
password: ${{ secrets.token }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: ./app
file: ./app/Dockerfile
platforms: linux/amd64
push: true
tags: localhost:3000/${{ gitea.repository }}:latest
- name: Generate stack yml for deployment
uses: nowactions/envsubst@v1
with:
input: ./stack_staging.tpl.yml
output: ./stack_staging.yml
env:
CACHE_HOST: "${{ vars.CACHE_HOST }}"
CACHE_PORT: "${{ vars.CACHE_PORT_STAGING }}"
APP_PORT: "${{ vars.APP_PORT_STAGING }}"
SECRET_KEY: "${{ vars.SECRET_KEY_STAGING }}"
TTL: "${{ vars.TTL_STAGING }}"
- name: Deploy
run: docker stack deploy -c ./stack_staging.yml inspirasite_staging

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB