diff --git a/templates/compose/apprise-api.yaml b/templates/compose/apprise-api.yaml new file mode 100644 index 000000000..e13450de1 --- /dev/null +++ b/templates/compose/apprise-api.yaml @@ -0,0 +1,15 @@ +services: + apprise-api: + image: 'linuxserver/apprise-api:latest' + environment: + - SERVICE_FQDN_APPRISE_8000 + - PUID=1000 + - PGID=1000 + - TZ=UTC + volumes: + - '/apprise-api/config:/config' + healthcheck: + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8000/"] + interval: 5s + timeout: 20s + retries: 10 diff --git a/templates/compose/cyberchef-x86.yaml b/templates/compose/cyberchef-x86.yaml new file mode 100644 index 000000000..47dcc2aea --- /dev/null +++ b/templates/compose/cyberchef-x86.yaml @@ -0,0 +1,16 @@ +services: + cyberchef: + image: 'ghcr.io/gchq/cyberchef:latest' + environment: + - SERVICE_FQDN_CYBERCHEF_80 + volumes: + - 'cyberchef-data:/app/data' + healthcheck: + test: + - CMD + - curl + - '-f' + - 'http://127.0.0.1:80' + interval: 30s + timeout: 10s + retries: 3 diff --git a/templates/compose/dashy.yaml b/templates/compose/dashy.yaml new file mode 100644 index 000000000..368f184db --- /dev/null +++ b/templates/compose/dashy.yaml @@ -0,0 +1,15 @@ +services: + dashy: + image: lissy93/dashy + environment: + - SERVICE_FQDN_DASHY_8080 + - PUID=1000 + - PGID=1000 + - TZ=UTC + volumes: + - '/Config/Dashy/conf.yml:/app/public/conf.yml' + healthcheck: + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8080/"] + interval: 5s + timeout: 20s + retries: 10 diff --git a/templates/compose/faraday.yaml b/templates/compose/faraday.yaml new file mode 100644 index 000000000..c342272c3 --- /dev/null +++ b/templates/compose/faraday.yaml @@ -0,0 +1,54 @@ +services: + postgresql: + image: 'postgres:latest' + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - 'pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}' + interval: 15s + timeout: 10s + retries: 15 + volumes: + - 'faraday-db:/var/lib/postgresql/data' + environment: + - 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}' + - 'POSTGRES_USER=${SERVICE_USER_POSTGRESQL}' + - 'POSTGRES_DB=${POSTGRES_DB:-faraday}' + redis: + image: 'redis:alpine' + command: '--save 60 1 --loglevel warning' + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - 'redis-cli ping | grep PONG' + interval: 15s + timeout: 10s + retries: 15 + volumes: + - 'redis:/data' + faraday: + image: 'faradaysec/faraday:latest' + restart: always + entrypoint: /entrypoint.sh + environment: + - SERVICE_FQDN_FARADAY_5985 + - 'AUTHENTIK_POSTGRESQL__PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}' + - 'PGSQL_USER=${SERVICE_USER_POSTGRESQL}' + - 'PGSQL_PASSWD=${SERVICE_PASSWORD_POSTGRESQL}' + - 'PGSQL_DBNAME=${POSTGRES_DB}' + - PGSQL_HOST=postgresql + - REDIS_SERVER=redis + volumes: + - '/faraday:/home/faraday/.faraday:rw' + depends_on: + postgresql: + condition: service_healthy + redis: + condition: service_healthy + healthcheck: + test: ["CMD", "nc", "-z", "localhost", "5985"] + interval: 30s + timeout: 10s + retries: 3 diff --git a/templates/compose/firefly.yaml b/templates/compose/firefly.yaml index 1b1c6bf65..3312baf06 100644 --- a/templates/compose/firefly.yaml +++ b/templates/compose/firefly.yaml @@ -68,3 +68,9 @@ services: crond -f -L /dev/stdout environment: - STATIC_CRON_TOKEN=$SERVICE_BASE64_CRONTOKEN + healthcheck: + test: ["CMD-SHELL", "ls /entrypoint.sh || exit 1"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s diff --git a/templates/compose/hoppscotch.yaml b/templates/compose/hoppscotch.yaml new file mode 100644 index 000000000..2b27fcefd --- /dev/null +++ b/templates/compose/hoppscotch.yaml @@ -0,0 +1,88 @@ +services: + backend: + image: 'hoppscotch/hoppscotch:latest' + environment: + - SERVICE_FQDN_HOPPSCOTCH_80 + - SERVICE_URL_HOPPSCOTCH + - 'VITE_ALLOWED_AUTH_PROVIDERS=${VITE_ALLOWED_AUTH_PROVIDERS:-GOOGLE,GITHUB,MICROSOFT,EMAIL}' + - 'DATABASE_URL=postgresql://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@hoppscotch-db:5432/${POSTGRES_DB}' + - 'JWT_SECRET=${SERVICE_PASSWORD_JWT}' + - 'TOKEN_SALT_COMPLEXITY=${TOKEN_SALT_COMPLEXITY:-10}' + - 'MAGIC_LINK_TOKEN_VALIDITY=${MAGIC_LINK_TOKEN_VALIDITY:-3}' + - 'REFRESH_TOKEN_VALIDITY=${REFRESH_TOKEN_VALIDITY:-604800000}' + - 'ACCESS_TOKEN_VALIDITY=${ACCESS_TOKEN_VALIDITY:-86400000}' + - 'SESSION_SECRET=${SERVICE_PASSWORD_SECRET}' + - 'ALLOW_SECURE_COOKIES=${ALLOW_SECURE_COOKIES:-true}' + - 'DATA_ENCRYPTION_KEY=${DATA_ENCRYPTION_KEY:-mustbeexactry32characterlikethat}' + - 'REDIRECT_URL=${SERVICE_FQDN_HOPPSCOTCH}' + - 'WHITELISTED_ORIGINS=${SERVICE_FQDN_HOPPSCOTCH}/backend,${SERVICE_FQDN_HOPPSCOTCH},${SERVICE_FQDN_HOPPSCOTCH}/admin' + - 'GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID:-*****}' + - 'GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET:-*****}' + - 'GOOGLE_CALLBACK_URL=${SERVICE_FQDN_HOPPSCOTCH}/backend/v1/auth/google/callback' + - 'GOOGLE_SCOPE=email,profile' + - 'GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID:-*****}' + - 'GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET:-*****}' + - 'GITHUB_CALLBACK_URL=${SERVICE_FQDN_HOPPSCOTCH}/backend/v1/auth/github/callback' + - 'GITHUB_SCOPE=user:email' + - 'MICROSOFT_CLIENT_ID=${MICROSOFT_CLIENT_ID:-*****}' + - 'MICROSOFT_CLIENT_SECRET=${MICROSOFT_CLIENT_SECRET:-*****}' + - 'MICROSOFT_CALLBACK_URL=${SERVICE_FQDN_HOPPSCOTCH}/backend/v1/auth/microsoft/callback' + - 'MICROSOFT_SCOPE=user.read' + - 'MICROSOFT_TENANT=common' + - 'MAILER_SMTP_ENABLE=${MAILER_SMTP_ENABLE:-false}' + - 'MAILER_USE_CUSTOM_CONFIGS=${MAILER_USE_CUSTOM_CONFIGS:-true}' + - 'MAILER_ADDRESS_FROM=${MAILER_ADDRESS_FROM:-user@example.com}' + - 'MAILER_SMTP_URL=${MAILER_SMTP_URL:-smtps_url}' + - 'MAILER_SMTP_HOST=${MAILER_SMTP_HOST:-smtp.example.com}' + - 'MAILER_SMTP_PORT=${MAILER_SMTP_PORT:-465}' + - 'MAILER_SMTP_SECURE=${MAILER_SMTP_SECURE:-true}' + - 'MAILER_SMTP_USER=${MAILER_SMTP_USER:-user@example.com}' + - 'MAILER_SMTP_PASSWORD=${MAILER_SMTP_PASSWORD:-mailpass}' + - 'MAILER_TLS_REJECT_UNAUTHORIZED=${MAILER_TLS_REJECT_UNAUTHORIZED:-false}' + - 'RATE_LIMIT_TTL=${RATE_LIMIT_TTL:-60}' + - 'RATE_LIMIT_MAX=${RATE_LIMIT_MAX:-100}' + - 'VITE_BASE_URL=${SERVICE_FQDN_HOPPSCOTCH}' + - 'VITE_SHORTCODE_BASE_URL=${SERVICE_FQDN_HOPPSCOTCH}' + - 'VITE_ADMIN_URL=${SERVICE_FQDN_HOPPSCOTCH}/admin' + - 'VITE_BACKEND_GQL_URL=${SERVICE_FQDN_HOPPSCOTCH}/backend/graphql' + - 'VITE_BACKEND_WS_URL=wss://${SERVICE_URL_HOPPSCOTCH}/backend/graphql' + - 'VITE_BACKEND_API_URL=${SERVICE_FQDN_HOPPSCOTCH}/backend/v1' + - 'VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms' + - 'VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy' + - ENABLE_SUBPATH_BASED_ACCESS=true + depends_on: + db-migration: + condition: service_completed_successfully + healthcheck: + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:80/"] + interval: 5s + timeout: 20s + retries: 10 + hoppscotch-db: + image: 'postgres:latest' + volumes: + - 'pg_data:/var/lib/postgresql/data' + environment: + - 'POSTGRES_USER=${SERVICE_USER_POSTGRES}' + - 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}' + - 'POSTGRES_DB=${POSTGRES_DB:-hoppscotch}' + healthcheck: + test: + - CMD-SHELL + - 'pg_isready -h localhost -U $${POSTGRES_USER} -d $${POSTGRES_DB}' + interval: 5s + timeout: 10s + retries: 10 + db-migration: + exclude_from_hc: true + image: 'hoppscotch/hoppscotch:latest' + depends_on: + hoppscotch-db: + condition: service_healthy + command: 'pnpx prisma migrate deploy' + restart: on-failure + environment: + - 'POSTGRES_USER=${SERVICE_USER_POSTGRES}' + - 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}' + - 'POSTGRES_DB=${POSTGRES_DB:-hoppscotch}' + - 'DATABASE_URL=postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@hoppscotch-db:5432/${POSTGRES_DB:-hoppscotch}' diff --git a/templates/compose/jupyter-notebook.yaml b/templates/compose/jupyter-notebook.yaml new file mode 100644 index 000000000..92313d087 --- /dev/null +++ b/templates/compose/jupyter-notebook.yaml @@ -0,0 +1,13 @@ +services: + jupyter-notebook: + image: 'quay.io/jupyter/base-notebook:latest' + environment: + - SERVICE_FQDN_JUPYTER_8888 + volumes: + - '/jupyter:/home/jovyan/work' + command: start-notebook.sh + healthcheck: + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8888/"] + interval: 30s + timeout: 20s + retries: 10 diff --git a/templates/compose/portainer.yaml b/templates/compose/portainer.yaml new file mode 100644 index 000000000..e12cb2111 --- /dev/null +++ b/templates/compose/portainer.yaml @@ -0,0 +1,13 @@ +services: + portainer: + image: 'portainer/portainer-ce:alpine' + environment: + - SERVICE_FQDN_PORTAINER_9000 + volumes: + - '/var/run/docker.sock:/var/run/docker.sock' + - 'portainer_data:/data' + healthcheck: + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:9000/"] + interval: 20s + timeout: 20s + retries: 10 diff --git a/templates/compose/postiz.yaml b/templates/compose/postiz.yaml index 0fb93c187..01a61594f 100644 --- a/templates/compose/postiz.yaml +++ b/templates/compose/postiz.yaml @@ -10,13 +10,13 @@ services: image: ghcr.io/gitroomhq/postiz-app:latest environment: - SERVICE_FQDN_POSTIZ_5000 - - MAIN_URL=${SERVICE_FQDN_POSTIZ_5000} - - FRONTEND_URL=${SERVICE_FQDN_POSTIZ_5000} - - NEXT_PUBLIC_BACKEND_URL=${SERVICE_FQDN_POSTIZ_5000}/api - - JWT_SECRET=${SERVICE_PASSWORD_JWTSECRET} - - DATABASE_URL=postgresql://${SERVICE_USER_POSTGRESQL}:${SERVICE_PASSWORD_POSTGRESQL}@postgresql:5432/${POSTGRESQL_DATABASE:-postiz-db} - - REDIS_URL=redis://postiz-redis:6379 - - BACKEND_INTERNAL_URL=http://localhost:3000 + - MAIN_URL=${SERVICE_FQDN_POSTIZ} + - FRONTEND_URL=${SERVICE_FQDN_POSTIZ} + - NEXT_PUBLIC_BACKEND_URL=${SERVICE_FQDN_POSTIZ}/api + - JWT_SECRET=${SERVICE_REALBASE64_JWTSECRET} + - DATABASE_URL=postgresql://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-postiz}?schema=public + - REDIS_URL=redis://redis:6379 + - BACKEND_INTERNAL_URL=http://localhost:3000/ - IS_GENERAL=true - STORAGE_PROVIDER=local - UPLOAD_DIRECTORY=/uploads @@ -70,6 +70,15 @@ services: postiz-postgres: image: postgres:14.5 volumes: + - 'postiz_config:/config' + - 'postiz_uploads:/uploads' + healthcheck: + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:5000/"] + interval: 5s + timeout: 20s + retries: 10 + postgres: + image: "postgres:latest" - postiz-postgresql-data:/var/lib/postgresql/data environment: - POSTGRES_USER=${SERVICE_USER_POSTGRESQL} diff --git a/templates/compose/syncthing.yaml b/templates/compose/syncthing.yaml index b6c896294..930bd048d 100644 --- a/templates/compose/syncthing.yaml +++ b/templates/compose/syncthing.yaml @@ -20,3 +20,8 @@ services: - '22000:22000/tcp' - '22000:22000/udp' - '21027:21027/udp' + healthcheck: + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8384/"] + interval: 5s + timeout: 20s + retries: 10 diff --git a/templates/compose/web-check.yaml b/templates/compose/web-check.yaml new file mode 100644 index 000000000..09c9d0e0f --- /dev/null +++ b/templates/compose/web-check.yaml @@ -0,0 +1,12 @@ +services: + web-check: + image: lissy93/web-check + environment: + - SERVICE_FQDN_WEBCHECK_3000 + healthcheck: + test: + - CMD-SHELL + - 'wget -qO- http://127.0.0.1:3000/' + interval: 5s + timeout: 20s + retries: 10