So I've deployed my project into Heroku using Gitlab CI/CD using following file:
image: maven:3.8.6-openjdk-18
services:
- postgres:latest
variables:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: trust
stages:
- build
- deploy
build:
stage: build
script:
- mvn package -Pprod
artifacts:
paths:
- target/cinema.jar
deploy:
stage: deploy
image: ruby:latest
script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
- dpl --provider=heroku --app=cinema --api-key=$HEROKU_API_KEY
only:
- main
I would love to connect from this place to postgres and give user all of the needed privileges on all tables to provided user.
Can't wrap my head around it, in order to make it work.
Thank you for any help!