From fc34ead429c570df185eb3f8f1091c5dc127614a Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Wed, 1 Mar 2023 21:20:28 +0100 Subject: [PATCH] chore(nocodb): refactor config --- .DS_Store | Bin 8196 -> 0 bytes apps/NocoDB/config.json | 6 ++-- apps/NocoDB/docker-compose.yml | 52 ++++++++++++++++++--------------- 3 files changed, 31 insertions(+), 27 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 086ed887972855ac974b640c5a824cafab1e4721..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHMU2GIp6u#fIz>FQ}Ef!mbt*lf*v7s&HU(js}6etK`x9zr|b$4f=Bh#6>GrL7d zV~Iv1`sCj$Mq;8qpz$X$Q85}dCdL>IA))%94@MK8OiYv)T5Q5F>D1A|T!mNxFngMRHQg@YO+8cmyCR zjsRhyHWv+&$w;OmIVmOeP=RzMDP0jAF(BQ^o{Yw&A~`9gbZ3YTABa{)bV5P6I?bO9 zhcl$4jO!SI7=gN^YN|HO z8;>7f+p)1Fxn}*EiI(K?jjP+J-LYU112m~6Fvq3AizKF_xU+j9rAfps*fOf;h_JLG%CpgWvwnDdfv?YC$y zyKHTx8ELA8Vzs?vVj92SD*7awQ*AOl?aYFP#4We2Y+bW)OV{>Y_nxcebqjB-*YzPn z&<*TEwpHvKx6NQ=Fy|L6*R*;3wqsALBZ^JY~I ztxY!@`azR!WRGWx*-ZY9D#tIo*)R@>p6;SWwHY}qUt#DOpFrTbXyBbKx}G^gkC^+> zQf=+J(dXpymcva=uCsQXZVZ%Vbi6k*ZmQRfY{45HrBM9HcK1Doalcr0cg_#?j#)0< z(&y3I-PAYakK~Hh-f^N>WbGkq`1r^!oVJ;E;8i+%DT+ZcU8iY=F)ZYDwZ=YUzskQ+ z>2cU@*(O>O=91lNbA?yUsg<%B;;7YE?2#1vRufy!HqZ{4VTYKUg4e#Gzi0~ZxV(Utki0;NG|R19T_ zvPx-HHYlCScBMz&xl+lX!I=>$S<)}P5h#PAFM7)9D`!xmXGhOYz4w~WpbHCR&MdmA zAt@4R!l6bQdvX64ZI;x6PCJ3=As51OL05euns9~M-S1s7kki;0SpqE z1(gqB1U8N!K#Ayl6vyx=9>e2!0#6d9pCwWYO23Gga2hY;3|_|@coXm8eVoOI_=rgU z1Im+90kr;D!RxrfPCq590>*S%IH5oi?W|7}NruO9l9&ErNbMvI6+Wp*PD)7@D*yV2 UfO!9B>~H<3jraeMxc~9$FZUou#Q*>R diff --git a/apps/NocoDB/config.json b/apps/NocoDB/config.json index f9071d6a..45ba0ad2 100644 --- a/apps/NocoDB/config.json +++ b/apps/NocoDB/config.json @@ -17,19 +17,19 @@ "type": "random", "label": "DB_PASSWORD", "min": 32, - "env_variable": "DB_PASSWORD" + "env_variable": "NOCODB_DB_PASSWORD" }, { "type": "random", "label": "JWT_SECRET", "min": 32, - "env_variable": "JWT_SECRET" + "env_variable": "NOCODB_JWT_SECRET" }, { "type": "random", "label": "REDIS_PASSWORD", "min": 32, - "env_variable": "REDIS_PASSWORD" + "env_variable": "NOCODB_REDIS_PASSWORD" } ] } diff --git a/apps/NocoDB/docker-compose.yml b/apps/NocoDB/docker-compose.yml index d3076220..c09d37d8 100644 --- a/apps/NocoDB/docker-compose.yml +++ b/apps/NocoDB/docker-compose.yml @@ -1,21 +1,22 @@ version: '2.1' -services: - nocodb: - depends_on: - nocodb_db: +services: + nocodb: + container_name: nocodb + depends_on: + nocodb-db: condition: service_healthy - environment: - - NC_DB="pg://nocodb_db:5432?u=postgres&p=${DB_PASSWORD}&d=nocodb_db" + environment: + - NC_DB=pg://nocodb-db:5432?u=postgres&p=${NOCODB_DB_PASSWORD}&d=nocodb - 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" + - NC_AUTH_JWT_SECRET=${NOCODB_JWT_SECRET} + - NC_REDIS_URL=redis://default:${NOCODB_REDIS_PASSWORD}@nocodb-redis:6379 + image: 'nocodb/nocodb:0.105.3' + ports: + - '${APP_PORT}:8080' restart: always - volumes: - - "${APP_DATA_DIR}/data/nocode-data:/usr/app/data" + volumes: + - '${APP_DATA_DIR}/data/nocode-data:/usr/app/data' networks: - tipi_main_network labels: @@ -25,31 +26,34 @@ services: 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} + + nocodb-db: + container_name: nocodb-db + environment: + POSTGRES_DB: nocodb + POSTGRES_PASSWORD: ${NOCODB_DB_PASSWORD} POSTGRES_USER: postgres - healthcheck: + healthcheck: interval: 10s retries: 10 - test: "pg_isready -U \"$$POSTGRES_USER\" -d \"$$POSTGRES_DB\"" + test: 'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"' timeout: 2s image: postgres restart: always - volumes: + volumes: - ${APP_DATA_DIR}/data/postgres:/var/lib/postgresql/data networks: - tipi_main_network - nocodb_redis: + + nocodb-redis: image: redis:alpine - container_name: nocodb_redis + container_name: nocodb-redis restart: unless-stopped - command: "redis-server --requirepass ${REDIS_PASSWORD}" + command: 'redis-server --requirepass ${NOCODB_REDIS_PASSWORD}' volumes: - ${APP_DATA_DIR}/data/redis:/data healthcheck: - test: ["CMD", "redis-cli", "ping"] + test: ['CMD', 'redis-cli', 'ping'] interval: 1s timeout: 3s retries: 30