-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat/health-check-endpoint
# Conflicts: # src/app.module.ts
- Loading branch information
Showing
25 changed files
with
357 additions
and
41 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
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 Backend in Development Enviroment | ||
|
||
on: | ||
push: | ||
branches: [develop] | ||
|
||
jobs: | ||
build: | ||
runs-on: dev | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Create .env file | ||
run: | | ||
touch .env | ||
echo TZ=${{ secrets.TZ }} >> .env | ||
echo DB_HOST=${{ secrets.DB_HOST }} >> .env | ||
echo DB_PORT=${{ secrets.DB_PORT }} >> .env | ||
echo DB_USER=${{ secrets.DB_USER }} >> .env | ||
echo DB_PASSWORD=${{ secrets.DB_PASSWORD }} >> .env | ||
echo DB_DATABASE_NAME=${{ secrets.DEV_DB_DATABASE_NAME }} >> .env | ||
echo DATABASE_URL=postgresql://${{ secrets.DB_USER }}:${{ secrets.DB_PASSWORD }}@${{ secrets.DB_HOST }}:${{ secrets.DB_PORT }}/${{ secrets.DEV_DB_DATABASE_NAME }}?schema=public >> .env | ||
echo SECRET_KEY=${{ secrets.SECRET_KEY }} >> .env | ||
echo HOST=${{ secrets.HOST }} >> .env | ||
echo PORT=${{ secrets.PORT }} >> .env | ||
echo SERVER_USER_PASSWORD=${{ secrets.SERVER_USER_PASSWORD }} >> .env | ||
cat .env | ||
- name: Remove old docker image | ||
run: echo ${{ secrets.SERVER_USER_PASSWORD }} | sudo -S docker compose down --rmi all | ||
|
||
- name: Create new docker image | ||
run: echo ${{ secrets.SERVER_USER_PASSWORD }} | sudo -S docker compose up -d --force-recreate |
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 Backend in Development Enviroment | ||
|
||
on: | ||
push: | ||
branches: [staging] | ||
|
||
jobs: | ||
build: | ||
runs-on: stg | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Create .env file | ||
run: | | ||
touch .env | ||
echo TZ=${{ secrets.TZ }} >> .env | ||
echo DB_HOST=${{ secrets.DB_HOST }} >> .env | ||
echo DB_PORT=${{ secrets.DB_PORT }} >> .env | ||
echo DB_USER=${{ secrets.DB_USER }} >> .env | ||
echo DB_PASSWORD=${{ secrets.DB_PASSWORD }} >> .env | ||
echo DB_DATABASE_NAME=${{ secrets.STG_DB_DATABASE_NAME }} >> .env | ||
echo DATABASE_URL=postgresql://${{ secrets.DB_USER }}:${{ secrets.DB_PASSWORD }}@${{ secrets.DB_HOST }}:${{ secrets.DB_PORT }}/${{ secrets.STG_DB_DATABASE_NAME }}?schema=public >> .env | ||
echo SECRET_KEY=${{ secrets.SECRET_KEY }} >> .env | ||
echo HOST=${{ secrets.HOST }} >> .env | ||
echo PORT=${{ secrets.PORT }} >> .env | ||
echo SERVER_USER_PASSWORD=${{ secrets.SERVER_USER_PASSWORD }} >> .env | ||
cat .env | ||
- name: Remove old docker image | ||
run: echo ${{ secrets.SERVER_USER_PASSWORD }} | sudo -S docker compose down --rmi all | ||
|
||
- name: Create new docker image | ||
run: echo ${{ secrets.SERVER_USER_PASSWORD }} | sudo -S docker compose up -d --force-recreate |
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,14 @@ | ||
-- CreateTable | ||
CREATE TABLE "supporters" ( | ||
"id" TEXT NOT NULL, | ||
"name" TEXT NOT NULL, | ||
"image_url" TEXT NOT NULL, | ||
"link" TEXT NOT NULL, | ||
"created_at" VARCHAR(32) NOT NULL, | ||
"updated_at" VARCHAR(32), | ||
|
||
CONSTRAINT "supporters_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "supporters_name_key" ON "supporters"("name"); |
3 changes: 3 additions & 0 deletions
3
prisma/migrations/20240517181431_add_unaccent_extension/migration.sql
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 @@ | ||
-- This is an empty migration. | ||
|
||
CREATE EXTENSION IF NOT EXISTS unaccent; |
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,6 @@ | ||
-- CreateEnum | ||
CREATE TYPE "ShelterCategory" AS ENUM ('Shelter', 'DistributionCenter'); | ||
|
||
-- AlterTable | ||
ALTER TABLE "shelters" ADD COLUMN "actived" BOOLEAN NOT NULL DEFAULT true, | ||
ADD COLUMN "category" "ShelterCategory" NOT NULL DEFAULT 'Shelter'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import z from 'zod'; | ||
|
||
const PartnerSchema = z.object({ | ||
id: z.string(), | ||
name: z.string(), | ||
link: z.string(), | ||
createdAt: z.string(), | ||
updatedAt: z.string().nullable().optional(), | ||
}); | ||
|
||
const CreatePartnerSchema = PartnerSchema.omit({ | ||
id: true, | ||
createdAt: true, | ||
updatedAt: true, | ||
}); | ||
|
||
export { PartnerSchema, CreatePartnerSchema }; |
Empty file.
Empty file.
Empty file.
Empty file.
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.