-
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.
Agora funciona sem acessar o disco salvando imagem no redis, corrigid…
…o problema no delay, corrigido bug com sessão, adicionado workflows github actions
- Loading branch information
Showing
17 changed files
with
326 additions
and
197 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,89 @@ | ||
name: CI CD Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
|
||
- name: Run test script | ||
run: | | ||
echo "$FUNCIONA_VARIAVEIS" | ||
ls -lhas | ||
echo "Nome da imagem weilplace-api" | ||
echo "$IMG_WEILPLACE_API" | ||
echo "Nome da imagem weilplace-site" | ||
echo "$IMG_WEILPLACE_SITE" | ||
echo "REF: ${{ github.ref }}" | ||
- name: Set up environment | ||
run: mv ./backend/.env.example ./backend/.env | ||
|
||
- name: Install and run tests | ||
run: | | ||
cd ./backend | ||
npm ci | ||
npm run test | ||
# https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-docker-images | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
attestations: write | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
|
||
# https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ vars.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Set up environment | ||
run: mv ./backend/.env.example ./backend/.env | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: apimeta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: erickweil/weilplace-api | ||
|
||
- name: Build and push (backend) | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./backend | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.apimeta.outputs.tags }} | ||
labels: ${{ steps.apimeta.outputs.labels }} | ||
|
||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: sitemeta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: erickweil/weilplace-site | ||
|
||
- name: Build and push (frontend) | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./frontend | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.sitemeta.outputs.tags }} | ||
labels: ${{ steps.sitemeta.outputs.labels }} |
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 @@ | ||
.kompose/ | ||
*.secret* | ||
.vercel |
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,3 @@ | ||
public/* | ||
*.secret* | ||
node_modules/ |
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
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
Oops, something went wrong.