Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #5

Merged
merged 8 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ name: "[CD] Continuous Delivery"
on:
pull_request:
types: [opened, synchronize]

env:
VERCEL_ORG_ID: team_LQQ8EA13GiS1PZApkHKSIck9
VERCEL_PROJECT_ID: prj_JdHzBfznmrwQTqsldULnikdWXD7b
jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -19,4 +21,4 @@ jobs:
- name: "Install Dependencies"
run: "npm install"
- name: "Publish to Vercel"
run: "npx vercel --prod"
run: "npx vercel --prod --token=c2JS23XHGpIQLMekiTNbAy08"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ web_modules/
.env.test.local
.env.production.local
.env.local
.env.template

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand Down
5 changes: 5 additions & 0 deletions .vercelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.github
.vscode
cypress
core
terraform
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start:crud": "npx ts-node ./core/crud.ts",
"dev:crud": "nodemon --ext ts,tsx --exec 'yarn start'",
"dev": "next dev",
"build": "next build",
"build": "prisma generate && next build",
"start": "next start",
"lint": "eslint './**/*.{jsx,jsx,ts,tsx}'",
"lint:fix": "yarn lint --fix",
Expand Down Expand Up @@ -55,4 +55,4 @@
"uuid": "^9.0.0",
"zod": "^3.22.2"
}
}
}
78 changes: 0 additions & 78 deletions src/server/repository/todo.ts

This file was deleted.

23 changes: 13 additions & 10 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ terraform {
provider "aws" {
region = "us-east-1"
}

data "aws_security_group" "public_port" {
id = "sg-0225c9598f4f0cd8f"
}
resource "aws_db_instance" "default" {
allocated_storage = 10
db_name = "study"
engine = "postgres"
engine_version = "15.3"
instance_class = "db.t3.micro"
username = "postgres"
password = "9ad3fa01-de19-4a7c-ac71-a3eb8271c056"
publicly_accessible = true
skip_final_snapshot = true
allocated_storage = 10
db_name = "study"
engine = "postgres"
engine_version = "15.3"
instance_class = "db.t3.micro"
username = "postgres"
password = "9ad3fa01-de19-4a7c-ac71-a3eb8271c056"
publicly_accessible = true
vpc_security_group_ids = [data.aws_security_group.public_port.id]
skip_final_snapshot = true
}
31 changes: 28 additions & 3 deletions terraform/terraform.tfstate
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
{
"version": 4,
"terraform_version": "1.5.4",
"serial": 5,
"serial": 7,
"lineage": "10ca8984-0b45-e522-331f-d8f2514ff7e6",
"outputs": {},
"resources": [
{
"mode": "data",
"type": "aws_security_group",
"name": "public_port",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"arn": "arn:aws:ec2:us-east-1:675744721428:security-group/sg-0225c9598f4f0cd8f",
"description": "acesso ao banco de dados",
"filter": null,
"id": "sg-0225c9598f4f0cd8f",
"name": "dbInbound",
"tags": {},
"timeouts": null,
"vpc_id": "vpc-03de2156d329a184d"
},
"sensitive_attributes": []
}
]
},
{
"mode": "managed",
"type": "aws_db_instance",
Expand Down Expand Up @@ -89,11 +111,14 @@
"timezone": "",
"username": "postgres",
"vpc_security_group_ids": [
"sg-011c95960655a8c1e"
"sg-0225c9598f4f0cd8f"
]
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoyNDAwMDAwMDAwMDAwLCJkZWxldGUiOjM2MDAwMDAwMDAwMDAsInVwZGF0ZSI6NDgwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMiJ9"
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoyNDAwMDAwMDAwMDAwLCJkZWxldGUiOjM2MDAwMDAwMDAwMDAsInVwZGF0ZSI6NDgwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMiJ9",
"dependencies": [
"data.aws_security_group.public_port"
]
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions terraform/terraform.tfstate.backup
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 4,
"terraform_version": "1.5.4",
"serial": 3,
"serial": 5,
"lineage": "10ca8984-0b45-e522-331f-d8f2514ff7e6",
"outputs": {},
"resources": [
Expand Down Expand Up @@ -36,7 +36,7 @@
"deletion_protection": false,
"domain": "",
"domain_iam_role_name": "",
"enabled_cloudwatch_logs_exports": null,
"enabled_cloudwatch_logs_exports": [],
"endpoint": "terraform-20231010041006281000000001.c5wea3nooocc.us-east-1.rds.amazonaws.com:5432",
"engine": "postgres",
"engine_version": "15.3",
Expand Down Expand Up @@ -70,7 +70,7 @@
"performance_insights_kms_key_id": "",
"performance_insights_retention_period": 0,
"port": 5432,
"publicly_accessible": false,
"publicly_accessible": true,
"replica_mode": "",
"replicas": [],
"replicate_source_db": "",
Expand All @@ -83,7 +83,7 @@
"storage_encrypted": false,
"storage_throughput": 0,
"storage_type": "gp2",
"tags": null,
"tags": {},
"tags_all": {},
"timeouts": null,
"timezone": "",
Expand Down
75 changes: 46 additions & 29 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,48 @@
{
"compilerOptions": {
"target": "es2016",
"module": "commonjs",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"noEmit": true,
"incremental": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"baseUrl": ".",
"paths": {
"@/ui/*": ["src/ui/*"],
"@/server/*": ["src/server/*"],
"@/db-crud-todo": ["core/crud.ts"]
},
"plugins": [
{
"name": "next"
}
]
"compilerOptions": {
"target": "es2016",
"module": "commonjs",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"noEmit": true,
"incremental": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"baseUrl": ".",
"paths": {
"@/ui/*": [
"src/ui/*"
],
"@/server/*": [
"src/server/*"
],
"@/db-crud-todo/*": [
"core/*"
]
},
"include": ["next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
"plugins": [
{
"name": "next"
}
]
},
"include": [
"next-env.d.ts",
".next/types/**/*.ts",
"**/*.ts",
"**/*.tsx"
],
"exclude": [
"node_modules"
]
}