chore(nocodb): refactor config
This commit is contained in:
parent
56925a8edc
commit
fc34ead429
|
@ -17,19 +17,19 @@
|
||||||
"type": "random",
|
"type": "random",
|
||||||
"label": "DB_PASSWORD",
|
"label": "DB_PASSWORD",
|
||||||
"min": 32,
|
"min": 32,
|
||||||
"env_variable": "DB_PASSWORD"
|
"env_variable": "NOCODB_DB_PASSWORD"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "random",
|
"type": "random",
|
||||||
"label": "JWT_SECRET",
|
"label": "JWT_SECRET",
|
||||||
"min": 32,
|
"min": 32,
|
||||||
"env_variable": "JWT_SECRET"
|
"env_variable": "NOCODB_JWT_SECRET"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "random",
|
"type": "random",
|
||||||
"label": "REDIS_PASSWORD",
|
"label": "REDIS_PASSWORD",
|
||||||
"min": 32,
|
"min": 32,
|
||||||
"env_variable": "REDIS_PASSWORD"
|
"env_variable": "NOCODB_REDIS_PASSWORD"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,22 @@
|
||||||
version: '2.1'
|
version: '2.1'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
nocodb:
|
nocodb:
|
||||||
depends_on:
|
container_name: nocodb
|
||||||
nocodb_db:
|
depends_on:
|
||||||
|
nocodb-db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
- NC_DB="pg://nocodb_db:5432?u=postgres&p=${DB_PASSWORD}&d=nocodb_db"
|
- NC_DB=pg://nocodb-db:5432?u=postgres&p=${NOCODB_DB_PASSWORD}&d=nocodb
|
||||||
- NC_PUBLIC_URL=https://${APP_DOMAIN}
|
- NC_PUBLIC_URL=https://${APP_DOMAIN}
|
||||||
- NC_AUTH_JWT_SECRET=${JWT_SECRET}
|
- NC_AUTH_JWT_SECRET=${NOCODB_JWT_SECRET}
|
||||||
- NC_REDIS_URL=redis://default:${REDIS_PASSWORD}@nocodb_redis:637
|
- NC_REDIS_URL=redis://default:${NOCODB_REDIS_PASSWORD}@nocodb-redis:6379
|
||||||
image: "nocodb/nocodb:0.105.3"
|
image: 'nocodb/nocodb:0.105.3'
|
||||||
ports:
|
ports:
|
||||||
- "${APP_PORT}:8080"
|
- '${APP_PORT}:8080'
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- "${APP_DATA_DIR}/data/nocode-data:/usr/app/data"
|
- '${APP_DATA_DIR}/data/nocode-data:/usr/app/data'
|
||||||
networks:
|
networks:
|
||||||
- tipi_main_network
|
- tipi_main_network
|
||||||
labels:
|
labels:
|
||||||
|
@ -25,31 +26,34 @@ services:
|
||||||
traefik.http.routers.nocodb.service: nocodb
|
traefik.http.routers.nocodb.service: nocodb
|
||||||
traefik.http.routers.nocodb.tls.certresolver: myresolver
|
traefik.http.routers.nocodb.tls.certresolver: myresolver
|
||||||
traefik.http.services.nocodb.loadbalancer.server.port: 8080
|
traefik.http.services.nocodb.loadbalancer.server.port: 8080
|
||||||
nocodb_db:
|
|
||||||
environment:
|
nocodb-db:
|
||||||
POSTGRES_DB: nocodb_db
|
container_name: nocodb-db
|
||||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
environment:
|
||||||
|
POSTGRES_DB: nocodb
|
||||||
|
POSTGRES_PASSWORD: ${NOCODB_DB_PASSWORD}
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
healthcheck:
|
healthcheck:
|
||||||
interval: 10s
|
interval: 10s
|
||||||
retries: 10
|
retries: 10
|
||||||
test: "pg_isready -U \"$$POSTGRES_USER\" -d \"$$POSTGRES_DB\""
|
test: 'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"'
|
||||||
timeout: 2s
|
timeout: 2s
|
||||||
image: postgres
|
image: postgres
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ${APP_DATA_DIR}/data/postgres:/var/lib/postgresql/data
|
- ${APP_DATA_DIR}/data/postgres:/var/lib/postgresql/data
|
||||||
networks:
|
networks:
|
||||||
- tipi_main_network
|
- tipi_main_network
|
||||||
nocodb_redis:
|
|
||||||
|
nocodb-redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
container_name: nocodb_redis
|
container_name: nocodb-redis
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: "redis-server --requirepass ${REDIS_PASSWORD}"
|
command: 'redis-server --requirepass ${NOCODB_REDIS_PASSWORD}'
|
||||||
volumes:
|
volumes:
|
||||||
- ${APP_DATA_DIR}/data/redis:/data
|
- ${APP_DATA_DIR}/data/redis:/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "redis-cli", "ping"]
|
test: ['CMD', 'redis-cli', 'ping']
|
||||||
interval: 1s
|
interval: 1s
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
retries: 30
|
retries: 30
|
||||||
|
|
Loading…
Reference in New Issue
Block a user