Capybara Backend service
Start Docker daemon:
colima start
Build and run the database:
docker rm main
docker run --name main \
-e POSTGRES_USER=main \
-e POSTGRES_PASSWORD=mysecretpassword \
-e POSTGRES_DB=main \
-p 5432:5432 \
-d \
--net=host \
postgres:14
Build and run the application:
./gradlew clean build
docker build -t capybara-backend:0.0.0-development .
docker image tag capybara-backend:0.0.0-development capybara-backend:latest
docker run -p 8080:8080 --net=host capybara-backend:0.0.0-development
./gradlew clean build
docker build -t {Docker repository}/capybara-backend:0.0.0-development .
docker image tag {Docker repository}/capybara-backend:0.0.0-development {Docker repository}/capybara-backend:latest
docker image push --all-tags {Docker repository}/capybara-backend
Replace {Docker repository}
Artifact Registry repository, please see
the documentation for more information
gcloud run deploy capybara-backend \
--image {Docker repository}/capybara-backend:latest \
--allow-unauthenticated \
--region={Region} \
--add-cloudsql-instances={Cloud SQL instance connection name}