53 lines
1.7 KiB
Docker
53 lines
1.7 KiB
Docker
# DOMAIN=example.com docker stack deploy -c nocodb.yml nocodb
|
|
|
|
services:
|
|
nocodb:
|
|
image: nocodb/nocodb:${VERSION:-0.207.0}
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:8080 || exit 1"]
|
|
environment:
|
|
- NC_DB=pg://postgres:5432?u=nocodb&p=myp@ssw0rd&d=nocodb
|
|
- NC_PUBLIC_URL=${SCHEME:-https}://${DOMAIN:-nocodb.localhost}
|
|
- NC_DISABLE_TELE=true
|
|
- NC_INVITE_ONLY_SIGNUP=${NC_INVITE_ONLY_SIGNUP:-true}
|
|
- NC_SMTP_FROM=${SMTP_FROM:-noreply@example.com}
|
|
- NC_SMTP_HOST=${SMTP_HOST:-smtp.example.com}
|
|
- NC_SMTP_PORT=${SMTP_PORT:-587}
|
|
- NC_SMTP_USERNAME=${SMTP_USERNAME:-noreply@example.com}
|
|
- NC_SMTP_PASSWORD=${SMTP_PASSWORD:-myp@ssw0rd}
|
|
- NC_SMTP_SECURE=${SMTP_SECURE:-true}
|
|
deploy:
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.nocodb-${NUMBER:-1}.rule=Host(`${DOMAIN:-nocodb.localhost}`)
|
|
- traefik.http.routers.nocodb-${NUMBER:-1}.entrypoints=${SCHEME:-https}
|
|
- traefik.http.routers.nocodb-${NUMBER:-1}.service=nocodb-${NUMBER:-1}
|
|
- traefik.http.routers.nocodb-${NUMBER:-1}.tls.certresolver=letsencrypt
|
|
- traefik.http.services.nocodb-${NUMBER:-1}.loadbalancer.server.port=8080
|
|
networks:
|
|
- internal
|
|
- traefik
|
|
|
|
postgres:
|
|
image: postgres:12-alpine
|
|
environment:
|
|
- POSTGRES_DB=nocodb
|
|
- POSTGRES_USER=nocodb
|
|
- POSTGRES_PASSWORD=myp@ssw0rd
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "nocodb", "-d", "nocodb"]
|
|
volumes:
|
|
- ${VOLUME_PATH}postgres:/var/lib/postgresql/data
|
|
networks:
|
|
- internal
|
|
|
|
volumes:
|
|
postgres:
|
|
|
|
networks:
|
|
internal:
|
|
driver: overlay
|
|
attachable: true
|
|
traefik:
|
|
external: true
|
|
name: traefik-net
|