aboutsummaryrefslogtreecommitdiffstats
path: root/compose.yml
diff options
context:
space:
mode:
authorJan T <jan@jantuomi.fi>2024-02-28 17:32:01 +0200
committerJan Tuomi <jan@jantuomi.fi>2024-12-21 19:43:13 +0200
commitb6bc5c5794b4df182175da34e6b08298084c0324 (patch)
tree501362805ac744eb71e0e9d7b70addb9f0c9ae99 /compose.yml
Initial commit
Diffstat (limited to 'compose.yml')
-rw-r--r--compose.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/compose.yml b/compose.yml
new file mode 100644
index 0000000..7fae4b0
--- /dev/null
+++ b/compose.yml
@@ -0,0 +1,31 @@
+services:
+ db:
+ image: postgres:14
+ environment:
+ POSTGRES_DB: db
+ POSTGRES_USER: postgres
+ POSTGRES_PASSWORD: postgres
+ ports:
+ - "54321:5432"
+ volumes:
+ - db-data:/var/lib/postgresql/data
+ healthcheck:
+ test: ['CMD-SHELL', 'pg_isready -U postgres']
+ interval: 5s
+ timeout: 5s
+ retries: 5
+
+ web:
+ build: .
+ environment:
+ BASE_URL: http://localhost:8000
+ DB_PASSWORD: postgres
+ DB_HOST: db
+ ports:
+ - "8000:8000"
+ depends_on:
+ db:
+ condition: service_healthy
+
+volumes:
+ db-data: