58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
YAML
version: '2.1'
|
|
|
|
services:
|
|
nocodb:
|
|
depends_on:
|
|
nocodb_db:
|
|
condition: service_healthy
|
|
environment:
|
|
- NC_DB="pg://nocodb_db:5432?u=postgres&p=${DB_PASSWORD}&d=nocodb_db"
|
|
- NC_PUBLIC_URL=https://${APP_DOMAIN}
|
|
- NC_AUTH_JWT_SECRET=${JWT_SECRET}
|
|
- NC_REDIS_URL=redis://default:${REDIS_PASSWORD}@nocodb_redis:637
|
|
image: "nocodb/nocodb:0.105.3"
|
|
ports:
|
|
- "${APP_PORT}:8080"
|
|
restart: always
|
|
volumes:
|
|
- "${APP_DATA_DIR}/data/nocode-data:/usr/app/data"
|
|
networks:
|
|
- tipi_main_network
|
|
labels:
|
|
traefik.enable: ${APP_EXPOSED}
|
|
traefik.http.routers.nocodb.rule: Host(`${APP_DOMAIN}`)
|
|
traefik.http.routers.nocodb.entrypoints: websecure
|
|
traefik.http.routers.nocodb.service: nocodb
|
|
traefik.http.routers.nocodb.tls.certresolver: myresolver
|
|
traefik.http.services.nocodb.loadbalancer.server.port: 8080
|
|
nocodb_db:
|
|
environment:
|
|
POSTGRES_DB: nocodb_db
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
POSTGRES_USER: postgres
|
|
healthcheck:
|
|
interval: 10s
|
|
retries: 10
|
|
test: "pg_isready -U \"$$POSTGRES_USER\" -d \"$$POSTGRES_DB\""
|
|
timeout: 2s
|
|
image: postgres
|
|
restart: always
|
|
volumes:
|
|
- ${APP_DATA_DIR}/data/postgres:/var/lib/postgresql/data
|
|
networks:
|
|
- tipi_main_network
|
|
nocodb_redis:
|
|
image: redis:alpine
|
|
container_name: nocodb_redis
|
|
restart: unless-stopped
|
|
command: "redis-server --requirepass ${REDIS_PASSWORD}"
|
|
volumes:
|
|
- ${APP_DATA_DIR}/data/redis:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 1s
|
|
timeout: 3s
|
|
retries: 30
|
|
networks:
|
|
- tipi_main_network
|