Add Domain-Locker/Compose.yaml
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user