-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Dev database with backup and restore scripts (#141)
* feat: Create backup script * fix: Explicity call bash for non-unix environments * feat: Alternative approach using docker * fix: Handle issue with env files * feat: Local dev db, backup and restore scripts, via Docker * docs: Add mermaid diagram to readme * fix: Remove pnpm lockfile * fix: dev script * chore: Setup .gitattributes to handle line endings
- Loading branch information
1 parent
3fc5af3
commit 3b184d8
Showing
10 changed files
with
296 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Ensure shell scripts use LF (Unix) line endings, not CRLF (Windows) | ||
*.sh text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,4 +41,7 @@ next.config.mjs | |
next-env.d.ts | ||
|
||
# IDE | ||
.vscode | ||
.vscode | ||
|
||
# backups | ||
backups/*.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: '3.8' | ||
services: | ||
postgres: | ||
image: postgres:17 | ||
env_file: | ||
- .env.local | ||
environment: | ||
POSTGRES_DB: ${POSTGRES_DATABASE} | ||
ports: | ||
- "5400:5432" | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data | ||
healthcheck: | ||
test: ["CMD-SHELL", "pg_isready -U postgres"] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 5 | ||
|
||
dbtools: | ||
image: postgres:17 | ||
volumes: | ||
- ./backups:/backups | ||
- ./scripts:/scripts | ||
environment: | ||
POSTGRES_URL: ${POSTGRES_URL} | ||
POSTGRES_DATABASE: ${POSTGRES_DATABASE} | ||
POSTGRES_USER: ${POSTGRES_USER} | ||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | ||
depends_on: | ||
postgres: | ||
condition: service_healthy | ||
profiles: | ||
- tools | ||
|
||
volumes: | ||
postgres_data: |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.