summaryrefslogtreecommitdiff
path: root/stacks/db/compose.yml
diff options
context:
space:
mode:
Diffstat (limited to 'stacks/db/compose.yml')
-rw-r--r--stacks/db/compose.yml45
1 files changed, 45 insertions, 0 deletions
diff --git a/stacks/db/compose.yml b/stacks/db/compose.yml
new file mode 100644
index 0000000..b7227d1
--- /dev/null
+++ b/stacks/db/compose.yml
@@ -0,0 +1,45 @@
+name: ${_STACK_0}
+
+networks:
+ db-net:
+ name: ${_NET_0}
+ external: true
+ edge-net:
+ name: ${_NET_1}
+ external: true
+
+volumes:
+ db-data:
+ name: ${_VOLUME_0}
+ external: true
+
+services:
+ db-test:
+ container_name: ${_CONTAINER_0}
+ image: postgres:16
+ restart: unless-stopped
+ env_file:
+ - .run.env # Runtime ENV
+ - .env # Compose ENV
+ volumes:
+ - db-data:/var/lib/postgresql/data
+ networks:
+ - db-net
+ expose:
+ - 5432
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
+ interval: 5s
+ retries: 5
+ db-admin:
+ container_name: ${_CONTAINER_1}
+ image: adminer:latest
+ env_file:
+ - .env
+ depends_on:
+ - db-test
+ networks:
+ - edge-net
+ - db-net
+ expose:
+ - 8080