refactor repo
This commit is contained in:
7
backend_part1/rendu_inspirasite/README.md
Normal file
7
backend_part1/rendu_inspirasite/README.md
Normal 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
|
23
backend_part1/rendu_inspirasite/feature.yml
Normal file
23
backend_part1/rendu_inspirasite/feature.yml
Normal 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
|
1
backend_part1/rendu_inspirasite/ispirasite
Submodule
1
backend_part1/rendu_inspirasite/ispirasite
Submodule
Submodule backend_part1/rendu_inspirasite/ispirasite added at 488ccfb3cf
43
backend_part1/rendu_inspirasite/prod.yml
Normal file
43
backend_part1/rendu_inspirasite/prod.yml
Normal 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 |
43
backend_part1/rendu_inspirasite/staging.yml
Normal file
43
backend_part1/rendu_inspirasite/staging.yml
Normal 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
|
BIN
backend_part1/rendu_inspirasite/vars_env.png
Normal file
BIN
backend_part1/rendu_inspirasite/vars_env.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
Reference in New Issue
Block a user