Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.62 KB

README.md

File metadata and controls

61 lines (40 loc) · 1.62 KB

reallyconfused-apis

Development

Setup Database

  • make start-postgres

Create User

docker exec -it postgres12 createdb --username=root --owner=root golang docker exec -it postgres12 psql -U root golang

Prod

Connecting to local db

Locally

Make .keys folder mkdir .keys inside go-apis

Then run touch .env inside the .keys folder. Populate it with

databaseName=postgres
databasePassword=secret
databaseUser=root
databaseType=postgres
databaseHost=localhost
databasePort=5432
secretKey=secret
[email protected]
supportPassword=password

Build Container docker build -t rcapis .

Connect to local database docker run --env-file .keys/.env --net=host -p 8080:8080 rcapis:latest

Connect to prod db docker run --env-file .keys/.prodenv -p 8080:8080 rcapis:latest

Push to Production

gcloud builds submit --tag gcr.io/alrt-ai/confused-apis

gcloud run deploy --image gcr.io/alrt-ai/confused-apis --platform managed confused-apis

Resources