init
This commit is contained in:
parent
b7722a7aa4
commit
6389c948af
|
@ -1,8 +1,11 @@
|
|||
TYPE=nocodb
|
||||
|
||||
DOMAIN=nocodb.example.com
|
||||
DOMAIN={{ .Domain }}
|
||||
|
||||
## Domain aliases
|
||||
#EXTRA_DOMAINS=', `www.nocodb.example.com`'
|
||||
|
||||
LETS_ENCRYPT_ENV=production
|
||||
|
||||
SECRET_DB_PASSWORD_VERSION=v1
|
||||
SECRET_NC_DB_URL_VERSION=v1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# nocodb
|
||||
|
||||
> One line description of the recipe
|
||||
> NocoDB is a no-code database platform that allows teams to collaborate and build applications with ease of a familiar and intuitive spreadsheet interface. This allows even non-developers or business users to become software creators.
|
||||
|
||||
<!-- metadata -->
|
||||
|
||||
|
@ -17,8 +17,11 @@
|
|||
|
||||
## Quick start
|
||||
|
||||
* `abra app new nocodb --secrets`
|
||||
* `abra app new nocodb`
|
||||
* `abra app config <app-name>`
|
||||
* `export DATABASE_PW=$(pwgen 20)`
|
||||
* `abra app secret insert <app-name> db_password v1 ${DATABASE_PW}`
|
||||
* `abra app secret insert <app-name> nc_db_url v1 pg://db:5432?u=nocodb&p=${DATABASE_PW}&d=nocodb`
|
||||
* `abra app deploy <app-name>`
|
||||
|
||||
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).
|
||||
|
|
47
compose.yml
47
compose.yml
|
@ -3,15 +3,24 @@ version: "3.8"
|
|||
|
||||
services:
|
||||
app:
|
||||
image: nginx:1.20.0
|
||||
image: nocodb/nocodb:latest
|
||||
secrets:
|
||||
- nc_db_url
|
||||
networks:
|
||||
- proxy
|
||||
- internal
|
||||
environment:
|
||||
DATABASE_URL_FILE: /run/secrets/nc_db_url
|
||||
NC_PUBLIC_URL: https://${DOMAIN}
|
||||
NC_DISABLE_TELE: "true"
|
||||
volumes:
|
||||
- data:/usr/app/data
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
|
||||
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8080"
|
||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
|
||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
|
@ -20,13 +29,39 @@ services:
|
|||
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
||||
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||
- "coop-cloud.${STACK_NAME}.version="
|
||||
|
||||
db:
|
||||
image: postgres:12.1-alpine
|
||||
secrets:
|
||||
- db_password
|
||||
networks:
|
||||
- internal
|
||||
environment:
|
||||
POSTGRES_USER: nocodb
|
||||
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
|
||||
POSTGRES_DB: nocodb
|
||||
volumes:
|
||||
- db:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
test: pg_isready -U ${DATABASE_USER} -d ${DATABASE_NAME}
|
||||
interval: 10s
|
||||
timeout: 2s
|
||||
retries: 10
|
||||
start_period: 1m
|
||||
|
||||
volumes:
|
||||
data:
|
||||
db:
|
||||
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
internal:
|
||||
|
||||
secrets:
|
||||
db_password:
|
||||
external: true
|
||||
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
|
||||
nc_db_url:
|
||||
external: true
|
||||
name: ${STACK_NAME}_nc_db_url_${SECRET_NC_DB_URL_VERSION}
|
||||
|
|
Loading…
Reference in New Issue