diff --git a/backend/dev-dockerfile b/backend/dev-dockerfile index 0fbd123e..451218df 100644 --- a/backend/dev-dockerfile +++ b/backend/dev-dockerfile @@ -2,3 +2,4 @@ FROM amazoncorretto:17 ENV HOME=/app RUN mkdir -p $HOME WORKDIR $HOME +ENTRYPOINT [ "./gradlew", "bootRun", "--continuous", "--args=--server.port=8081" ] \ No newline at end of file diff --git a/backend/src/main/resources/application.yaml b/backend/src/main/resources/application.yaml index bf39617d..d1245d58 100644 --- a/backend/src/main/resources/application.yaml +++ b/backend/src/main/resources/application.yaml @@ -1,9 +1,8 @@ spring: datasource: - url: ${POSTGRES_HOST:postgres_fqdn}?sslmode=require - username: ${DB_USERNAME:postgres_user} - password: ${POSTGRES_USER:postgres_password} - name: ${POSTGRES_DB:postgres_db_name} + url: jdbc:postgresql://${POSTGRES_HOST:db}:${DB_PORT:5432}/${POSTGRES_DB:reportvision}?sslmode=${SSL_MODE:disable} + username: ${POSTGRES_USER:postgres} + password: ${POSTGRES_PASSWORD:super_secret_password} devtools: restart: enabled: true diff --git a/dev-env.yaml b/dev-env.yaml index 56da7afe..4bccd393 100644 --- a/dev-env.yaml +++ b/dev-env.yaml @@ -31,11 +31,12 @@ services: ports: - "5432:5432" environment: - POSTGRES_DB: ${postgres_db_name} - POSTGRES_HOST: ${postgres_fqdn} - POSTGRES_USER: ${postgres_user} - POSTGRES_PASSWORD: ${postgres_password} - sslmode: require + POSTGRES_DB: ${postgres_db_name:-reportvision} + POSTGRES_HOST: ${postgres_fqdn:-localhost} + POSTGRES_USER: ${postgres_user:-postgres} + POSTGRES_PASSWORD: ${postgres_password:-super_secret_password} + DB_PORT: ${postgres_port:-5432} + SSL_MODE: ${postgres_sslmode:-disable} api: build: context: ./backend