diff --git a/.gitignore b/.gitignore index 7dbd092..396e397 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ dist/ .next/ +.env diff --git a/hasura-rest/.gitignore b/hasura-rest/.gitignore deleted file mode 100644 index 4c49bd7..0000000 --- a/hasura-rest/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.env diff --git a/nocodb/Makefile b/nocodb/Makefile new file mode 100644 index 0000000..ceffdda --- /dev/null +++ b/nocodb/Makefile @@ -0,0 +1,5 @@ +.env: + touch .env + chmod 600 .env + @echo POSTGRES_PASSWORD=$(shell openssl rand -hex 32) >> .env + @echo NC_AUTH_JWT_SECRET=$(shell openssl rand -hex 32) >> .env diff --git a/nocodb/compose.yml b/nocodb/compose.yml new file mode 100644 index 0000000..1db8ffc --- /dev/null +++ b/nocodb/compose.yml @@ -0,0 +1,28 @@ +services: + nocodb: + image: nocodb/nocodb:latest + ports: + - 8080:8080 + volumes: + - nocodb_data:/usr/app/data + environment: + NC_DB: pg://db?u=postgres&p=${POSTGRES_PASSWORD:?}&d=postgres + NC_AUTH_JWT_SECRET: ${NC_AUTH_JWT_SECRET:?} + db: + image: postgres:16-alpine + environment: + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?} + volumes: + - postgres_data:/var/lib/postgresql/data + pgadmin: + image: dpage/pgadmin4:latest + ports: + - "8888:80" + environment: + PGADMIN_DEFAULT_EMAIL: postgres@db.host.docker.internal + PGADMIN_DEFAULT_PASSWORD: ${POSTGRES_PASSWORD:?} + volumes: + - ./servers.json:/pgadmin4/servers.json:ro +volumes: + nocodb_data: + postgres_data: diff --git a/nocodb/servers.json b/nocodb/servers.json new file mode 100644 index 0000000..6fce1be --- /dev/null +++ b/nocodb/servers.json @@ -0,0 +1,13 @@ +{ + "Servers": { + "1": { + "Name": "postgres@db", + "Group": "docker", + "Port": 5432, + "Username": "postgres", + "Host": "db", + "SSLMode": "prefer", + "MaintenanceDB": "postgres" + } + } +}