From 7191a45a096c88593a11264aa29fd753341617ab Mon Sep 17 00:00:00 2001 From: Grandmaster Mitko Date: Mon, 12 Jan 2026 23:17:37 +0200 Subject: [PATCH 1/5] Added a docker-compose.yml file that deploys a PostgreSQL17 database and a .env.template file --- .env.template | 8 ++++++++ docker-compose.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .env.template create mode 100644 docker-compose.yml diff --git a/.env.template b/.env.template new file mode 100644 index 0000000..79dc716 --- /dev/null +++ b/.env.template @@ -0,0 +1,8 @@ +#Provide a username +SKILLFORGE_POSTGRES_USER=skillforge_admin + +#Provide a password +SKILLFORGE_POSTGRES_PASSWORD=0020 + +#Provide a database name +SKILLFORGE_POSTGRES_DBNAME=skillforge_db \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..463d512 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,27 @@ +services: + skillforge-db: + image: postgres:17 + container_name: skillforge-db + hostname: skillforge-db + environment: + POSTGRES_USER: ${SKILLFORGE_POSTGRES_USER} + POSTGRES_PASSWORD: ${SKILLFORGE_POSTGRES_PASSWORD} + POSTGRES_DB: ${SKILLFORGE_POSTGRES_DBNAME} + TZ: Europe/Sofia + ports: + - "5432:5432" + volumes: + - skillforge-db:/var/lib/postgresql/data + networks: + - skillforge + + +volumes: + skillforge-db: + driver: local + name: skillforge-db + +networks: + skillforge: + driver: bridge + name: skillforge From 1348b5908811bf65211c4d8ee06866cf28e0e1f4 Mon Sep 17 00:00:00 2001 From: Grandmaster Mitko Date: Tue, 13 Jan 2026 00:19:45 +0200 Subject: [PATCH 2/5] Fixed stuff according to acceptance criteria --- .env.template | 7 ++++++- backend/.env.template | 13 +++++++++++++ docker-compose.yml => backend/docker-compose.yml | 4 ++-- 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 backend/.env.template rename docker-compose.yml => backend/docker-compose.yml (87%) diff --git a/.env.template b/.env.template index 79dc716..59f5020 100644 --- a/.env.template +++ b/.env.template @@ -5,4 +5,9 @@ SKILLFORGE_POSTGRES_USER=skillforge_admin SKILLFORGE_POSTGRES_PASSWORD=0020 #Provide a database name -SKILLFORGE_POSTGRES_DBNAME=skillforge_db \ No newline at end of file +SKILLFORGE_POSTGRES_DBNAME=skillforge_db + +#Provide a port +SKILLFORGE_POSTGRES_PORT=5432:5432 + +SKILLFORGE_TIMEZONE=Europe/Sofia \ No newline at end of file diff --git a/backend/.env.template b/backend/.env.template new file mode 100644 index 0000000..59f5020 --- /dev/null +++ b/backend/.env.template @@ -0,0 +1,13 @@ +#Provide a username +SKILLFORGE_POSTGRES_USER=skillforge_admin + +#Provide a password +SKILLFORGE_POSTGRES_PASSWORD=0020 + +#Provide a database name +SKILLFORGE_POSTGRES_DBNAME=skillforge_db + +#Provide a port +SKILLFORGE_POSTGRES_PORT=5432:5432 + +SKILLFORGE_TIMEZONE=Europe/Sofia \ No newline at end of file diff --git a/docker-compose.yml b/backend/docker-compose.yml similarity index 87% rename from docker-compose.yml rename to backend/docker-compose.yml index 463d512..cc1adec 100644 --- a/docker-compose.yml +++ b/backend/docker-compose.yml @@ -7,9 +7,9 @@ services: POSTGRES_USER: ${SKILLFORGE_POSTGRES_USER} POSTGRES_PASSWORD: ${SKILLFORGE_POSTGRES_PASSWORD} POSTGRES_DB: ${SKILLFORGE_POSTGRES_DBNAME} - TZ: Europe/Sofia + TZ: ${SKILLFORGE_TIMEZONE} ports: - - "5432:5432" + - "${SKILLFORGE_POSTGRES_PORT}" volumes: - skillforge-db:/var/lib/postgresql/data networks: From 6d5337817864ba2b97c8e38b081cd3e8b1c31dce Mon Sep 17 00:00:00 2001 From: GrandmasterMitko <75795846+TemplarBrotherKnight@users.noreply.github.com> Date: Tue, 13 Jan 2026 13:14:20 +0200 Subject: [PATCH 3/5] Deleted .env.template, not the one in "backend" --- .env.template | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .env.template diff --git a/.env.template b/.env.template deleted file mode 100644 index 59f5020..0000000 --- a/.env.template +++ /dev/null @@ -1,13 +0,0 @@ -#Provide a username -SKILLFORGE_POSTGRES_USER=skillforge_admin - -#Provide a password -SKILLFORGE_POSTGRES_PASSWORD=0020 - -#Provide a database name -SKILLFORGE_POSTGRES_DBNAME=skillforge_db - -#Provide a port -SKILLFORGE_POSTGRES_PORT=5432:5432 - -SKILLFORGE_TIMEZONE=Europe/Sofia \ No newline at end of file From 8941ced6e24651fa8edd83690872225af1a6a712 Mon Sep 17 00:00:00 2001 From: GrandmasterMitko <75795846+TemplarBrotherKnight@users.noreply.github.com> Date: Tue, 13 Jan 2026 13:17:56 +0200 Subject: [PATCH 4/5] Updated .env.template --- backend/.env.template | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/backend/.env.template b/backend/.env.template index 59f5020..a155370 100644 --- a/backend/.env.template +++ b/backend/.env.template @@ -1,13 +1,6 @@ -#Provide a username -SKILLFORGE_POSTGRES_USER=skillforge_admin - -#Provide a password -SKILLFORGE_POSTGRES_PASSWORD=0020 - -#Provide a database name -SKILLFORGE_POSTGRES_DBNAME=skillforge_db - -#Provide a port -SKILLFORGE_POSTGRES_PORT=5432:5432 - -SKILLFORGE_TIMEZONE=Europe/Sofia \ No newline at end of file +#Postgres SQL Envs +SKILLFORGE_POSTGRES_USER="your-username" +SKILLFORGE_POSTGRES_PASSWORD="your-password" +SKILLFORGE_POSTGRES_DBNAME="your-db-name" +SKILLFORGE_POSTGRES_PORT="your-host-port" +SKILLFORGE_TIMEZONE="Europe/Sofia" From 4d4b50e64638f0396db380e9d0de7ff16ac6eb17 Mon Sep 17 00:00:00 2001 From: GrandmasterMitko <75795846+TemplarBrotherKnight@users.noreply.github.com> Date: Tue, 13 Jan 2026 13:19:49 +0200 Subject: [PATCH 5/5] Updated docker-compose.yml port forwarding --- backend/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/docker-compose.yml b/backend/docker-compose.yml index cc1adec..24645d3 100644 --- a/backend/docker-compose.yml +++ b/backend/docker-compose.yml @@ -9,7 +9,7 @@ services: POSTGRES_DB: ${SKILLFORGE_POSTGRES_DBNAME} TZ: ${SKILLFORGE_TIMEZONE} ports: - - "${SKILLFORGE_POSTGRES_PORT}" + - "${SKILLFORGE_POSTGRES_PORT}:5432" volumes: - skillforge-db:/var/lib/postgresql/data networks: