From a915e45a3c597a4705621a1aab2d29b9c8e572d8 Mon Sep 17 00:00:00 2001 From: Lyna Date: Sun, 5 Oct 2025 21:28:48 +0100 Subject: [PATCH] build: basic compose file --- .dockerignore | 1 + compose.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .dockerignore create mode 100644 compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9f97022 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +target/ \ No newline at end of file diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..98a8d30 --- /dev/null +++ b/compose.yml @@ -0,0 +1,31 @@ +services: + plc-mirror: + image: registry.gitlab.com/parakeet-social/plc-mirror:main + restart: unless-stopped + ports: + - 8080:8080 + depends_on: + plc-mirror-db: + condition: service_healthy + environment: + PLC_DB_URI: postgres://plcmirror:${PLC_MIRROR_DB_PASSWORD:?}@plc-mirror-db/plcmirror + PLC_BIND_ADDR: 0.0.0.0:8080 + + plc-mirror-db: + image: postgres:18-alpine + restart: unless-stopped + environment: + POSTGRES_USER: plcmirror + POSTGRES_PASSWORD: ${PLC_MIRROR_DB_PASSWORD:?} + POSTGRES_DB: plcmirror + volumes: + - plc-mirror-db-data:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] + interval: 5s + timeout: 5s + retries: 5 + start_period: 10s + +volumes: + plc-mirror-db-data: -- 2.43.0