refactor: Add Postgres service

This commit is contained in:
Foster Hangdaan 2024-12-13 17:08:33 -05:00
parent 7da58e3417
commit 70575f4e4a
Signed by: foster
GPG key ID: E48D7F49A852F112
2 changed files with 26 additions and 0 deletions

View file

@ -5,6 +5,12 @@
# Runtime environment. Valid values are: production, development.
ROMDEX_ENV=development
# Database
ROMDEX_DB_HOST=romdex-db
ROMDEX_DB_USER=postgres
ROMDEX_DB_PASSWORD=postgres
ROMDEX_DB_DATABASE=postgres
######
# Deno
######
@ -17,3 +23,12 @@ DENO_DIR=/var/cache/deno
#######
FRESH_NO_UPDATE_CHECK=true
##########
# Postgres
##########
POSTGRES_HOST=romdex-db
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=postgres

View file

@ -5,6 +5,8 @@ volumes:
external: true
deno-cache:
external: true
romdex-db-data:
external: true
services:
romdex:
@ -29,3 +31,12 @@ services:
- ./tailwind.config.ts:/app/tailwind.config.ts:ro
- deno-cache:/var/cache/deno
- romdex-data:/app/data
romdex-db:
container_name: romdex-db
image: docker.io/library/postgres:17-alpine
env_file: .env.development.local
ports:
- "5432:5432"
volumes:
- romdex-db-data:/var/lib/postgresql/data