-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from fga-eps-mds/dev
Deploy to main
- Loading branch information
Showing
128 changed files
with
7,386 additions
and
699 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,3 @@ | ||
NEXT_PUBLIC_API_URL= | ||
NEXTAUTH_URL= | ||
NEXTAUTH_SECRET= |
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,34 @@ | ||
name: Deploy App in Azure | ||
|
||
# Dispara o workflow para push e pull request na branch 'dev' | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
|
||
|
||
jobs: | ||
run-script: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: executing remote ssh commands using password | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.IP_VM_AZURE_DEV }} | ||
username: ${{ secrets.USER_VM_AZURE_DEV }} | ||
password: ${{ secrets.USER_VM_AZURE_DEV }} | ||
port: 22 | ||
request_pty: true | ||
script: | | ||
ls -alt | ||
cd /home/Calculus-admin1/app | ||
pwd | ||
sudo ./manage_process_front.sh | ||
echo "Starting deploy Front" | ||
sudo ./deploy_front.sh | ||
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
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,17 @@ | ||
{ | ||
"$schema": "https://ui.shadcn.com/schema.json", | ||
"style": "default", | ||
"rsc": true, | ||
"tsx": true, | ||
"tailwind": { | ||
"config": "tailwind.config.ts", | ||
"css": "src/app/globals.css", | ||
"baseColor": "slate", | ||
"cssVariables": false, | ||
"prefix": "" | ||
}, | ||
"aliases": { | ||
"components": "@/components", | ||
"utils": "@/lib/utils" | ||
} | ||
} |
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,8 @@ | ||
// next.config.js | ||
|
||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
} | ||
|
||
module.exports = nextConfig |
This file was deleted.
Oops, something went wrong.
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,59 @@ | ||
#!/bin/bash | ||
|
||
SESSION_NAME="npm_run_session" | ||
ENV="dev" | ||
DIR1="/home/Calculus-admin1/app/2024.1-CALCULUS-Frontend" | ||
|
||
# Comandos renomeados para refletir a ordem de execução | ||
CMD1="git fetch" | ||
CMD2="git checkout $ENV" | ||
CMD3="git pull origin $ENV" | ||
CMD4="npm install" | ||
CMD5="npm run dev &" | ||
CMD6="echo Starting Deploy Front" | ||
|
||
# Função para iniciar a sessão tmux e executar comandos | ||
start_tmux_session() { | ||
# Criar uma nova sessão tmux | ||
tmux kill-session -t $SESSION_NAME 2>/dev/null | ||
tmux new-session -d -s $SESSION_NAME | ||
|
||
# Executar os comandos na pasta do frontend | ||
tmux send-keys -t $SESSION_NAME "cd $DIR1" C-m | ||
tmux send-keys -t $SESSION_NAME "$CMD1" C-m | ||
tmux send-keys -t $SESSION_NAME "$CMD2" C-m | ||
tmux send-keys -t $SESSION_NAME "$CMD3" C-m | ||
tmux send-keys -t $SESSION_NAME "$CMD4" C-m | ||
tmux send-keys -t $SESSION_NAME "$CMD5" C-m | ||
tmux send-keys -t $SESSION_NAME "$CMD6" C-m | ||
|
||
# Anexar à sessão tmux para visualizar os comandos em execução | ||
} | ||
|
||
# Função para executar o health check | ||
run_healthcheck() { | ||
PORT=4000 | ||
CHECK_INTERVAL=5 | ||
|
||
echo "Iniciando health check para a porta $PORT..." | ||
|
||
while true; do | ||
# Executa o comando para verificar se a porta está em uso | ||
OUTPUT=$(ss -tuln | grep ":$PORT") | ||
|
||
# Verifica se há algum resultado | ||
if [ -n "$OUTPUT" ]; then | ||
echo "A porta $PORT está em uso. Encerrando o health check." | ||
break | ||
else | ||
echo "A porta $PORT não está em uso. Verificando novamente em $CHECK_INTERVAL segundos..." | ||
sleep $CHECK_INTERVAL | ||
fi | ||
done | ||
} | ||
|
||
# Iniciar a sessão tmux e executar os comandos | ||
start_tmux_session | ||
|
||
# Após a execução do tmux, iniciar o health check | ||
run_healthcheck |
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
Oops, something went wrong.