aboutsummaryrefslogtreecommitdiff
path: root/compose.yml
diff options
context:
space:
mode:
authorRuben Beltran del Rio <jj@r.bdr.sh>2025-12-03 21:54:29 +0100
committerRuben Beltran del Rio <jj@r.bdr.sh>2025-12-03 21:55:07 +0100
commit89eeeb9075acec512111c9f78ed8158a556e06e4 (patch)
tree23ab351a1a6d09255bd12f7866908761f8a473bd /compose.yml
parent587d8fe65d61b8f7217b4e8850b44e43159c16fb (diff)
Save WIP Again.HEADmain
Diffstat (limited to 'compose.yml')
-rw-r--r--compose.yml55
1 files changed, 55 insertions, 0 deletions
diff --git a/compose.yml b/compose.yml
new file mode 100644
index 0000000..06ec142
--- /dev/null
+++ b/compose.yml
@@ -0,0 +1,55 @@
+version: "3"
+services:
+ canvas:
+ build:
+ context: .
+ dockerfile: Containerfile
+ env_file: .env
+ command:
+ - pnpm
+ - exec
+ - vite
+ - dev
+ - --host
+ - 0.0.0.0
+ restart: always
+ volumes:
+ - ./src:/canvas/src:cached
+ - ./static:/canvas/static:cached
+ ports:
+ - 5173:5173
+ depends_on:
+ database:
+ condition: service_healthy
+ networks:
+ - canvas
+
+ database:
+ env_file: .env
+ image: docker.io/library/postgres:17-alpine
+ environment:
+ POSTGRES_USER: ${DB_USER}
+ POSTGRES_PASSWORD: ${DB_PASSWORD}
+ POSTGRES_DB: ${DB_DATABASE}
+ healthcheck:
+ test: ["CMD", "pg_isready", "--host=localhost", "--username=${DB_USER}"]
+ interval: 10s
+ timeout: 5s
+ retries: 5
+ start_interval: 5s
+ start_period: 30s
+ volumes:
+ - canvas-db-data:/var/lib/postgresql/data
+ - ./schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro
+ ports:
+ - "5432:5432"
+ networks:
+ - canvas
+
+volumes:
+ canvas-db-data:
+
+networks:
+ canvas:
+ name: canvas
+ driver: bridge