Skip to content

Commit 27d560a

Browse files
Added a docker-compose.yml file that deploys a PostgreSQL17 database and a .env.template file. (#7)
* Added a docker-compose.yml file that deploys a PostgreSQL17 database and a .env.template file * Fixed stuff according to acceptance criteria * Deleted .env.template, not the one in "backend" * Updated .env.template * Updated docker-compose.yml port forwarding
1 parent 856912e commit 27d560a

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

backend/.env.template

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Postgres SQL Envs
2+
SKILLFORGE_POSTGRES_USER="your-username"
3+
SKILLFORGE_POSTGRES_PASSWORD="your-password"
4+
SKILLFORGE_POSTGRES_DBNAME="your-db-name"
5+
SKILLFORGE_POSTGRES_PORT="your-host-port"
6+
SKILLFORGE_TIMEZONE="Europe/Sofia"

backend/docker-compose.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
services:
2+
skillforge-db:
3+
image: postgres:17
4+
container_name: skillforge-db
5+
hostname: skillforge-db
6+
environment:
7+
POSTGRES_USER: ${SKILLFORGE_POSTGRES_USER}
8+
POSTGRES_PASSWORD: ${SKILLFORGE_POSTGRES_PASSWORD}
9+
POSTGRES_DB: ${SKILLFORGE_POSTGRES_DBNAME}
10+
TZ: ${SKILLFORGE_TIMEZONE}
11+
ports:
12+
- "${SKILLFORGE_POSTGRES_PORT}:5432"
13+
volumes:
14+
- skillforge-db:/var/lib/postgresql/data
15+
networks:
16+
- skillforge
17+
18+
19+
volumes:
20+
skillforge-db:
21+
driver: local
22+
name: skillforge-db
23+
24+
networks:
25+
skillforge:
26+
driver: bridge
27+
name: skillforge

0 commit comments

Comments
 (0)