From 2aff2aa49b51e4f95f0ef94754efcc37a2df9203 Mon Sep 17 00:00:00 2001 From: Bento Silveira Date: Sun, 23 Jul 2023 12:42:37 -0300 Subject: [PATCH] Replaced DB variables with env file --- configuration.env | 13 +++++++------ docker-compose.yml | 8 ++------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/configuration.env b/configuration.env index da3266a..3edbc7a 100644 --- a/configuration.env +++ b/configuration.env @@ -38,12 +38,13 @@ DISABLE_REGISTRATION=false # Feed Retention Time in Days FEED_RETENTION=30 -# Database settings -hibernate.connection.url="jdbc:postgresql://postgres:5432/piped" -hibernate.connection.driver_class="org.postgresql.Driver" -hibernate.dialect="org.hibernate.dialect.PostgreSQLDialect" -hibernate.connection.username="piped" -hibernate.connection.password="changeme" +########################### +# database settings # +########################### + +POSTGRES_DB=piped +POSTGRES_USER=piped +POSTGRES_PASSWORD=changeme ########################### # Watchtower settings # diff --git a/docker-compose.yml b/docker-compose.yml index 50d3ce6..21c2097 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,14 +54,10 @@ services: postgres: image: postgres:15 restart: unless-stopped + env_file: + - configuration.env volumes: - ./data/db:/var/lib/postgresql/data - environment: - # Database settings. Make sure to adjust these values - # on the configuration.env file too. - - POSTGRES_DB=piped - - POSTGRES_USER=piped - - POSTGRES_PASSWORD=changeme watchtower: image: containrrr/watchtower restart: always