diff options
| author | RATDAD <lambda@disroot.org> | 2026-02-16 17:42:01 -0500 |
|---|---|---|
| committer | RATDAD <lambda@disroot.org> | 2026-02-16 17:42:01 -0500 |
| commit | 88ba319238bb4af0106bc1a83fbbb1963af88fe1 (patch) | |
| tree | 001a958124477d3c1dd810566086086cc449aa00 | |
| parent | e82c1c7ab7c63d584a4ba1a89f86732717aec4f3 (diff) | |
| download | rd-cloud-88ba319238bb4af0106bc1a83fbbb1963af88fe1.tar.gz rd-cloud-88ba319238bb4af0106bc1a83fbbb1963af88fe1.tar.bz2 rd-cloud-88ba319238bb4af0106bc1a83fbbb1963af88fe1.zip | |
Added PostgreSQL Container with Admin
| -rw-r--r-- | stacks/db/.gitignore | 3 | ||||
| -rw-r--r-- | stacks/db/compose.yml | 45 | ||||
| -rw-r--r-- | stacks/db/env.example | 16 | ||||
| -rw-r--r-- | stacks/db/run.env.example | 11 |
4 files changed, 75 insertions, 0 deletions
diff --git a/stacks/db/.gitignore b/stacks/db/.gitignore new file mode 100644 index 0000000..31c0c95 --- /dev/null +++ b/stacks/db/.gitignore @@ -0,0 +1,3 @@ +*.env +password +compose.test.yml 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 diff --git a/stacks/db/env.example b/stacks/db/env.example new file mode 100644 index 0000000..05092c2 --- /dev/null +++ b/stacks/db/env.example @@ -0,0 +1,16 @@ +# +# +# Stack Compose Variables + +# Namespaces +_STACK_0= + +# Containers +_CONTAINER_0= + +# Network +_NET_0= +_NET_1= + +# Volumes +_VOLUME_0= diff --git a/stacks/db/run.env.example b/stacks/db/run.env.example new file mode 100644 index 0000000..b7371f5 --- /dev/null +++ b/stacks/db/run.env.example @@ -0,0 +1,11 @@ +# +# +# Stack Runtime Variables + +# PostgreSQL +POSTGRES_USER= +POSTGRES_PASSWORD= + +# Adminer +ADMINER_DEFAULT_SERVER= +ADMINER_DESIGN=mancave |
