diff --git a/Compose/peekaping/.env b/Compose/peekaping/.env new file mode 100644 index 0000000..d4c543f --- /dev/null +++ b/Compose/peekaping/.env @@ -0,0 +1,22 @@ + +# Database Configuration +DB_USER=root +DB_PASS=your-secure-password-here +DB_NAME=peekaping +DB_HOST=postgres +DB_PORT=5432 +DB_TYPE=postgres + +# Server Configuration +SERVER_PORT=8034 +CLIENT_URL="http://localhost:8383" + +# Application Settings +MODE=prod +TZ="America/Chicago" + +# JWT settings are automatically managed in the database +# Default settings are initialized on first startup: +# - Access token expiration: 15 minutes +# - Refresh token expiration: 720 hours (30 days) +# - Secret keys are automatically generated securely diff --git a/Compose/peekaping/peekaping.yaml b/Compose/peekaping/peekaping.yaml new file mode 100644 index 0000000..7c541d3 --- /dev/null +++ b/Compose/peekaping/peekaping.yaml @@ -0,0 +1,68 @@ +networks: + appnet: + + netgrimoire: + external: true + +services: + postgres: + image: postgres:17 + restart: unless-stopped + env_file: + - .env + environment: + POSTGRES_USER: ${DB_USER} + POSTGRES_PASSWORD: ${DB_PASS} + POSTGRES_DB: ${DB_NAME} + volumes: + - /data/nfs/Baxter/Docker/peekaping/postgres:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"] + interval: 1s + timeout: 60s + retries: 60 + networks: + - appnet + + migrate: + image: 0xfurai/peekaping-migrate:latest + restart: "no" + env_file: + - .env + depends_on: + postgres: + condition: service_healthy + networks: + - appnet + + server: + image: 0xfurai/peekaping-server:latest + restart: unless-stopped + env_file: + - .env + depends_on: + postgres: + condition: service_healthy + migrate: + condition: service_completed_successfully + networks: + - appnet + - netgrimoire + healthcheck: + test: ["CMD-SHELL", "wget -q http://localhost:8034/api/v1/health || exit 1"] + interval: 1s + timeout: 60s + retries: 60 + + web: + image: 0xfurai/peekaping-web:latest + restart: unless-stopped + networks: + - appnet + - netgrimoire + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:80 || exit 1"] + interval: 1s + timeout: 60s + retries: 60 +