아래와 같이 "docker-compose.yml" 파일을 작성합니다.
version: "3.9"
services:
db:
image: postgres
container_name: NocoDB-DATABASE
hostname: noco-pg
mem_limit: 512m
cpu_shares: 768
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "nocodb", "-U", "nocodbuser"]
timeout: 30s
interval: 10s
retries: 10
volumes:
- /volume1/docker/nocodb/db:/var/lib/postgresql/data:rw
environment:
POSTGRES_DB: nocodb
POSTGRES_USER: nocodbuser
POSTGRES_PASSWORD: nocodbpass
restart: on-failure:5
nocodb:
image: nocodb/nocodb:latest
container_name: NocoDB
hostname: nocodb
mem_limit: 1g
cpu_shares: 768
security_opt:
- no-new-privileges:true
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8080/ || exit 1
ports:
- 8631:8080
volumes:
- /volume1/docker/nocodb:/usr/app/data:rw
environment:
NC_ADMIN_EMAIL: Your-own-email-address //사용할 아이디 (이메일 주소)
NC_ADMIN_PASSWORD: Password@ //사용할 비밀번호
NC_DB: pg://noco-pg:5432?u=nocodbuser&p=nocodbpass&d=nocodb
NC_SMTP_HOST: smtp.gmail.com
NC_SMTP_FROM: Your-own-gmail-address
NC_SMTP_PORT: 587
NC_SMTP_USERNAME: Your-own-gmail-address
NC_SMTP_PASSWORD: Your-own-app-password
restart: on-failure:5
depends_on:
db:
condition: service_healthy
댓글 없음