From 5dbabaa153114cb2e76d383b988318b807b74e0f Mon Sep 17 00:00:00 2001 From: Gabe Date: Sat, 6 Dec 2025 01:14:49 +0000 Subject: [PATCH] Add Domain-Locker/Compose.yaml --- Domain-Locker/Compose.yaml | 69 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Domain-Locker/Compose.yaml diff --git a/Domain-Locker/Compose.yaml b/Domain-Locker/Compose.yaml new file mode 100644 index 0000000..7dc7286 --- /dev/null +++ b/Domain-Locker/Compose.yaml @@ -0,0 +1,69 @@ +services: + postgres: + image: postgres:15-alpine + container_name: domain-locker-db + restart: unless-stopped + + # Env vars for initial DB + environment: + POSTGRES_DB: domain_locker + POSTGRES_USER: postgres + POSTGRES_PASSWORD: changeme2420 + + ports: + - "5432:5432" + + volumes: + # This is where the Postgres data will be stored + - /srv/docker/domain-locker/postgres_data:/var/lib/postgresql/data + # If you want to skip the init script, you can use the SQL to seed the db + # - ./db/schema.sql:/docker-entrypoint-initdb.d/init-schema.sql:ro + networks: + - domain_locker_network + + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${DL_PG_USER:-postgres}"] + interval: 5s + timeout: 3s + retries: 10 + + app: + image: lissy93/domain-locker:latest # or ghcr.io/lissy93/domain-locker:latest + container_name: domain-locker-app + restart: unless-stopped + environment: + DL_ENV_TYPE: selfHosted + DL_PG_HOST: domain-locker-db + DL_PG_PORT: 5432 + DL_PG_USER: postgres + DL_PG_PASSWORD: changeme2420 + DL_PG_NAME: domain_locker + #NOTIFY_WEBHOOK_BASE: https://ntfy.sh + #NOTIFY_WEBHOOK_TOPIC: my-topic-name + #NOTIFY_WEBHOOK_TOKEN: optional-token-if-private + ports: + - "5099:3000" + depends_on: + - postgres + networks: + - domain_locker_network + + updater: + image: alpine:3.20 + container_name: domain-locker-updater + restart: unless-stopped + depends_on: + - app + networks: + - domain_locker_network + command: > + /bin/sh -c " + apk add --no-cache curl && + echo '0 3 * * * /usr/bin/curl -s -X POST http://app:3000/api/domain-updater' > /etc/crontabs/root && + echo '0 4 * * * /usr/bin/curl -s -X POST http://app:3000/api/expiration-reminders' >> /etc/crontabs/root && + crond -f -L /dev/stdout + " + +networks: + domain_locker_network: + driver: bridge \ No newline at end of file