Skip to content

Commit

Permalink
add compose
Browse files Browse the repository at this point in the history
  • Loading branch information
0x7d8 committed Nov 30, 2024
1 parent 90f9a12 commit fa14462
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DATABASE_URL="postgresql://postgres:password@localhost:5432/bpapi"
DATABASE_URL="postgresql://blueprint_api:local@db:5432/blueprint_api"

PORT=8000
INTERNAL_KEY="HKj5LZnavEfjqYDTEUi" # random string, if leaked change ASAP
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lib/
node_modules/
.env
.env
postgres
22 changes: 22 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
services:
web:
container_name: blueprint-api_web
image: ghcr.io/blueprintframework/api:latest
restart: unless-stopped
volumes:
- ./.env:/app/server/.env
depends_on:
- db
ports:
- 50000:8000

db:
container_name: blueprint-api_db
image: postgres:16
restart: unless-stopped
environment:
- POSTGRES_USER=blueprint_api
- POSTGRES_PASSWORD=local
- POSTGRES_DB=blueprint_api
volumes:
- ./postgres/data:/var/lib/postgresql/data
Empty file modified scripts/create_author.sh
100644 → 100755
Empty file.
Empty file modified scripts/pending_extensions.sh
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions scripts/psql.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker exec -u postgres -it blueprint-api_db psql -U blueprint_api blueprint_api
Empty file modified scripts/raw_sql.sh
100644 → 100755
Empty file.
Empty file modified scripts/reset_author_key.sh
100644 → 100755
Empty file.

0 comments on commit fa14462

Please sign in to comment.