diff --git a/docker-compose.yml b/docker-compose.yml index 7c6c6ba..682ebb2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,16 +1,7 @@ version: "3.7" services: - webapp: - build: - context: ./webapp - dockerfile: Dockerfile - args: - - VITE_SERVER_INTERNAL=http://server:8080 - - VITE_BRANDING=Noteshare.space [preview] - ports: - - "3000:3000" - + # Prisma sqlite migration utility migrate: build: context: ./server/prisma @@ -20,6 +11,7 @@ services: environment: - DATABASE_URL=file:/database/db.sqlite + # Backend server for managing saved notes server: build: context: ./server @@ -35,9 +27,21 @@ services: - POST_LIMIT_WINDOW_SECONDS=86400 - POST_LIMIT=50 depends_on: - - migrate + migrate: + condition: service_completed_successfully + + # Frontend for serving encrypted notes over HTML (SvelteKit) + webapp: + build: + context: ./webapp + dockerfile: Dockerfile + args: + - VITE_SERVER_INTERNAL=http://server:8080 + - VITE_BRANDING=Noteshare.space [preview] + ports: + - "3000:3000" + depends_on: + - server -## By default this config uses default local driver, -## For custom volumes replace with volume driver configuration. volumes: sqlite: \ No newline at end of file