2022-07-01 23:06:50 +03:00
|
|
|
version: "3.7"
|
|
|
|
|
|
|
|
services:
|
2022-07-03 11:27:11 +03:00
|
|
|
# Prisma sqlite migration utility
|
2022-07-01 23:06:50 +03:00
|
|
|
migrate:
|
|
|
|
build:
|
|
|
|
context: ./server/prisma
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
volumes:
|
|
|
|
- sqlite:/database/
|
|
|
|
environment:
|
|
|
|
- DATABASE_URL=file:/database/db.sqlite
|
|
|
|
|
2022-07-03 11:27:11 +03:00
|
|
|
# Backend server for managing saved notes
|
2022-07-03 11:27:29 +03:00
|
|
|
backend:
|
2022-07-01 23:06:50 +03:00
|
|
|
build:
|
|
|
|
context: ./server
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
ports:
|
|
|
|
- "8080:8080"
|
|
|
|
volumes:
|
|
|
|
- sqlite:/database/
|
|
|
|
environment:
|
|
|
|
- DATABASE_URL=file:/database/db.sqlite
|
2022-07-02 00:10:01 +03:00
|
|
|
- FRONTEND_URL=http://localhost:3000
|
2022-07-02 22:14:07 +03:00
|
|
|
- CLEANUP_INTERVAL_SECONDS=600
|
|
|
|
- POST_LIMIT_WINDOW_SECONDS=86400
|
|
|
|
- POST_LIMIT=50
|
2022-07-01 23:06:50 +03:00
|
|
|
depends_on:
|
2022-07-03 11:27:11 +03:00
|
|
|
migrate:
|
|
|
|
condition: service_completed_successfully
|
|
|
|
|
|
|
|
# Frontend for serving encrypted notes over HTML (SvelteKit)
|
2022-07-03 11:27:29 +03:00
|
|
|
frontend:
|
2022-07-03 11:27:11 +03:00
|
|
|
build:
|
|
|
|
context: ./webapp
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
args:
|
|
|
|
- VITE_SERVER_INTERNAL=http://server:8080
|
|
|
|
- VITE_BRANDING=Noteshare.space [preview]
|
|
|
|
ports:
|
|
|
|
- "3000:3000"
|
|
|
|
depends_on:
|
2022-07-03 11:27:53 +03:00
|
|
|
- backend
|
2022-07-01 23:06:50 +03:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
sqlite:
|