Skip to content

Commit 9ca82a6

Browse files
committed
workign on docker
1 parent d22fd9e commit 9ca82a6

File tree

4 files changed

+66
-0
lines changed

4 files changed

+66
-0
lines changed

samples/noco/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pg_data

samples/noco/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM nocodb/nocodb:latest
2+
3+
# You can add any additional configurations or customizations here if needed

samples/noco/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# NocoDB
2+
3+
This sample demosntrates how to deploy a Nocodb instance with Defang. It takes you to the Nocodb web page for signups and registration.
4+
5+
## Prerequisites
6+
7+
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
8+
2. (Optional) If you are using [Defang BYOC](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) authenticated with your AWS account
9+
3. (Optional - for local development) [Docker CLI](https://docs.docker.com/engine/install/)
10+
11+
## Deploying
12+
13+
1. Open the terminal and type `defang login`
14+
2. Type `defang compose up` in the CLI.
15+
3. Your app will be running within a few minutes.
16+
17+
## Development
18+
19+
For development, we use a local container. This can be seen in the compose.yaml document. To run the sample locally after cloning the respository, you can run on docker by using the following command:
20+
21+
1. docker compose -f compose.dev.yaml up --build
22+
23+
---
24+
25+
Title: Sailsjs
26+
27+
Short Description: A short hello world application demosntrating how to deploy Sailsjs onto defang.
28+
29+
Tags: Sailsjs
30+
31+
Languages: nodejs, javascript

samples/noco/compose.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: "3"
2+
services:
3+
nocodb:
4+
image: nocodb/nocodb:0.109.7
5+
ports:
6+
- "8080:8080"
7+
environment:
8+
- NC_DB=pg
9+
- DATABASE_URL=postgresql://noco:nocodb@db:5432/nocodb
10+
- NC_AUTH_JWT_SECRET=your_jwt_secret_here
11+
depends_on:
12+
db:
13+
condition: service_healthy
14+
restart: always
15+
16+
db:
17+
image: postgres:13
18+
environment:
19+
POSTGRES_DB: nocodb
20+
POSTGRES_USER: noco
21+
POSTGRES_PASSWORD: nocodb
22+
volumes:
23+
- ./pg_data:/var/lib/postgresql/data
24+
healthcheck:
25+
test: ["CMD-SHELL", "pg_isready -U noco"]
26+
interval: 10s
27+
timeout: 5s
28+
retries: 5
29+
30+
volumes:
31+
pg_data:

0 commit comments

Comments
 (0)