Added Airtrail
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
# Airtrail app image tag
|
||||||
|
AIRTRAIL_VERSION=latest
|
||||||
|
|
||||||
|
# Host port to expose the Airtrail web UI on
|
||||||
|
AIRTRAIL_PORT=3000
|
||||||
|
|
||||||
|
# Postgres image major version
|
||||||
|
AIRTRAIL_POSTGRES_VERSION=16
|
||||||
|
|
||||||
|
# Database name, username, and password for the Postgres instance
|
||||||
|
AIRTRAIL_DB_DATABASE_NAME=airtrail
|
||||||
|
AIRTRAIL_DB_USERNAME=airtrailuser
|
||||||
|
AIRTRAIL_DB_PASSWORD=
|
||||||
|
|
||||||
|
# Public-facing URL of the Airtrail app (used by the app for CORS/redirects)
|
||||||
|
AIRTRAIL_ORIGIN=http://192.168.1.100:3000
|
||||||
|
|
||||||
|
# IP address of the NFS server
|
||||||
|
AIRTRAIL_NFS_SERVER=192.168.1.50
|
||||||
|
|
||||||
|
# NFS export path for the database volume (must include leading colon)
|
||||||
|
AIRTRAIL_NFS_DEVICE=:/mnt/pool1/airtrail-db
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: johly/airtrail:${AIRTRAIL_VERSION:-latest}
|
||||||
|
container_name: airtrail-app
|
||||||
|
environment:
|
||||||
|
- ORIGIN=${AIRTRAIL_ORIGIN}
|
||||||
|
- DB_URL=postgres://${AIRTRAIL_DB_USERNAME}:${AIRTRAIL_DB_PASSWORD}@db:5432/${AIRTRAIL_DB_DATABASE_NAME}
|
||||||
|
- DB_DATABASE_NAME=${AIRTRAIL_DB_DATABASE_NAME}
|
||||||
|
- DB_USERNAME=${AIRTRAIL_DB_USERNAME}
|
||||||
|
- DB_PASSWORD=${AIRTRAIL_DB_PASSWORD}
|
||||||
|
ports:
|
||||||
|
- ${AIRTRAIL_PORT:-3000}:3000
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "node", "/app/healthcheck.js"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 40s
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: 512m
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: postgres:${AIRTRAIL_POSTGRES_VERSION:-16}
|
||||||
|
container_name: airtrail-db
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: ${AIRTRAIL_DB_DATABASE_NAME}
|
||||||
|
POSTGRES_USER: ${AIRTRAIL_DB_USERNAME}
|
||||||
|
POSTGRES_PASSWORD: ${AIRTRAIL_DB_PASSWORD}
|
||||||
|
volumes:
|
||||||
|
- airtrail-db:/var/lib/postgresql/data:rw
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U ${AIRTRAIL_DB_USERNAME} -d ${AIRTRAIL_DB_DATABASE_NAME}"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: 512m
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
airtrail-db:
|
||||||
|
name: airtrail-db
|
||||||
|
driver: local
|
||||||
|
driver_opts:
|
||||||
|
type: nfs
|
||||||
|
o: "addr=${AIRTRAIL_NFS_SERVER},rw,noatime,rsize=65536,wsize=65536,timeo=600,nfsvers=4"
|
||||||
|
device: "${AIRTRAIL_NFS_DEVICE}"
|
||||||
Reference in New Issue
Block a user