mirror of https://github.com/nocodb/nocodb
Wing-Kam Wong
2 years ago
6 changed files with 287 additions and 294 deletions
@ -1,33 +1,31 @@ |
|||||||
version: '2.4' |
version: "2.4" |
||||||
|
|
||||||
services: |
services: |
||||||
|
nocodb: |
||||||
|
depends_on: |
||||||
root_db: |
root_db: |
||||||
image: mcr.microsoft.com/mssql/server:2017-latest |
condition: service_healthy |
||||||
|
environment: |
||||||
|
NC_DB: "mssql://root_db:1433?u=sa&p=Password123.&d=root_db" |
||||||
|
image: "nocodb/nocodb:latest" |
||||||
|
ports: |
||||||
|
- "8080:8080" |
||||||
restart: always |
restart: always |
||||||
volumes: |
volumes: |
||||||
- db_data:/var/opt/mssql |
- "nc_data:/usr/app/data" |
||||||
|
root_db: |
||||||
environment: |
environment: |
||||||
|
ACCEPT_EULA: "Y" |
||||||
SA_PASSWORD: Password123. |
SA_PASSWORD: Password123. |
||||||
ACCEPT_EULA: Y |
|
||||||
healthcheck: |
healthcheck: |
||||||
test: /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "$$SA_PASSWORD" -Q "SELECT 1" || exit 1 |
|
||||||
interval: 10s |
interval: 10s |
||||||
timeout: 3s |
|
||||||
retries: 10 |
retries: 10 |
||||||
start_period: 10s |
start_period: 10s |
||||||
|
test: "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P \"$$SA_PASSWORD\" -Q \"SELECT 1\" || exit 1" |
||||||
nocodb: |
timeout: 3s |
||||||
depends_on: |
image: "mcr.microsoft.com/mssql/server:2017-latest" |
||||||
root_db: |
|
||||||
condition: service_healthy |
|
||||||
image: nocodb/nocodb:latest |
|
||||||
ports: |
|
||||||
- "8080:8080" |
|
||||||
restart: always |
restart: always |
||||||
volumes: |
volumes: |
||||||
- nc_data:/usr/app/data |
- "db_data:/var/opt/mssql" |
||||||
environment: |
|
||||||
NC_DB: "mssql://root_db:1433?u=sa&p=Password123.&d=root_db" |
|
||||||
volumes: |
volumes: |
||||||
db_data: {} |
db_data: {} |
||||||
nc_data: {} |
nc_data: {} |
||||||
|
@ -1,36 +1,39 @@ |
|||||||
version: '2.1' |
version: "2.1" |
||||||
|
|
||||||
services: |
services: |
||||||
root_db: |
|
||||||
image: mysql:5.7 |
|
||||||
volumes: |
|
||||||
- db_data:/var/lib/mysql |
|
||||||
# below line shows how to change charset and collation |
|
||||||
# uncomment it if necessary |
|
||||||
# command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci |
|
||||||
restart: always |
|
||||||
environment: |
|
||||||
MYSQL_ROOT_PASSWORD: password |
|
||||||
MYSQL_DATABASE: root_db |
|
||||||
MYSQL_USER: noco |
|
||||||
MYSQL_PASSWORD: password |
|
||||||
healthcheck: |
|
||||||
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ] |
|
||||||
timeout: 20s |
|
||||||
retries: 10 |
|
||||||
|
|
||||||
nocodb: |
nocodb: |
||||||
depends_on: |
depends_on: |
||||||
root_db: |
root_db: |
||||||
condition: service_healthy |
condition: service_healthy |
||||||
image: nocodb/nocodb:latest |
environment: |
||||||
|
NC_DB: "mysql2://root_db:3306?u=noco&p=password&d=root_db" |
||||||
|
image: "nocodb/nocodb:latest" |
||||||
ports: |
ports: |
||||||
- "8080:8080" |
- "8080:8080" |
||||||
restart: always |
restart: always |
||||||
volumes: |
volumes: |
||||||
- nc_data:/usr/app/data |
- "nc_data:/usr/app/data" |
||||||
|
root_db: |
||||||
environment: |
environment: |
||||||
NC_DB: "mysql2://root_db:3306?u=noco&p=password&d=root_db" |
MYSQL_DATABASE: root_db |
||||||
|
MYSQL_PASSWORD: password |
||||||
|
MYSQL_ROOT_PASSWORD: password |
||||||
|
MYSQL_USER: noco |
||||||
|
healthcheck: |
||||||
|
retries: 10 |
||||||
|
test: |
||||||
|
- CMD |
||||||
|
- mysqladmin |
||||||
|
- ping |
||||||
|
- "-h" |
||||||
|
- localhost |
||||||
|
timeout: 20s |
||||||
|
image: "mysql:5.7" |
||||||
|
restart: always |
||||||
|
volumes: |
||||||
|
- "db_data:/var/lib/mysql" |
||||||
|
# below line shows how to change charset and collation |
||||||
|
# uncomment it if necessary |
||||||
|
# command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci |
||||||
volumes: |
volumes: |
||||||
db_data: {} |
db_data: {} |
||||||
nc_data: {} |
nc_data: {} |
||||||
|
@ -1,58 +1,58 @@ |
|||||||
version: '2.1' |
version: '2.1' |
||||||
|
networks: |
||||||
|
default: ~ |
||||||
|
nginxproxy: ~ |
||||||
services: |
services: |
||||||
root_db: |
nginx-proxy-manager: |
||||||
image: mysql:5.7 |
|
||||||
volumes: |
|
||||||
- db_data:/var/lib/mysql |
|
||||||
restart: always |
|
||||||
environment: |
environment: |
||||||
MYSQL_ROOT_PASSWORD: password |
PGID: 1000 |
||||||
MYSQL_DATABASE: root_db |
PUID: 1000 |
||||||
MYSQL_USER: noco |
TZ: Europe/Amsterdam |
||||||
MYSQL_PASSWORD: password |
image: jlesage/nginx-proxy-manager |
||||||
healthcheck: |
|
||||||
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ] |
|
||||||
timeout: 20s |
|
||||||
retries: 10 |
|
||||||
networks: |
networks: |
||||||
- default |
- nginxproxy |
||||||
|
ports: |
||||||
|
- "8181:8181" |
||||||
|
- "80:8080" |
||||||
|
- "443:4443" |
||||||
|
restart: always |
||||||
|
volumes: |
||||||
|
- "nginx-proxy-manager:/config:rw" |
||||||
nocodb: |
nocodb: |
||||||
depends_on: |
depends_on: |
||||||
root_db: |
root_db: |
||||||
condition: service_healthy |
condition: service_healthy |
||||||
image: nocodb/nocodb:latest |
|
||||||
restart: always |
|
||||||
volumes: |
|
||||||
- nc_data:/usr/app/data |
|
||||||
environment: |
environment: |
||||||
NC_DB: "mysql2://root_db:3306?u=noco&p=password&d=root_db" |
NC_DB: "mysql2://root_db:3306?u=noco&p=password&d=root_db" |
||||||
|
image: "nocodb/nocodb:latest" |
||||||
networks: |
networks: |
||||||
- default |
- default |
||||||
- nginxproxy |
- nginxproxy |
||||||
|
|
||||||
nginx-proxy-manager: |
|
||||||
image: jlesage/nginx-proxy-manager |
|
||||||
restart: always |
restart: always |
||||||
environment: |
|
||||||
PUID: 1000 |
|
||||||
PGID: 1000 |
|
||||||
TZ: Europe/Amsterdam |
|
||||||
ports: |
|
||||||
- "8181:8181" |
|
||||||
- "80:8080" |
|
||||||
- "443:4443" |
|
||||||
volumes: |
volumes: |
||||||
- nginx-proxy-manager:/config:rw |
- "nc_data:/usr/app/data" |
||||||
|
root_db: |
||||||
|
environment: |
||||||
|
MYSQL_DATABASE: root_db |
||||||
|
MYSQL_PASSWORD: password |
||||||
|
MYSQL_ROOT_PASSWORD: password |
||||||
|
MYSQL_USER: noco |
||||||
|
healthcheck: |
||||||
|
retries: 10 |
||||||
|
test: |
||||||
|
- CMD |
||||||
|
- mysqladmin |
||||||
|
- ping |
||||||
|
- "-h" |
||||||
|
- localhost |
||||||
|
timeout: 20s |
||||||
|
image: "mysql:5.7" |
||||||
networks: |
networks: |
||||||
- nginxproxy |
- default |
||||||
|
restart: always |
||||||
|
volumes: |
||||||
|
- "db_data:/var/lib/mysql" |
||||||
volumes: |
volumes: |
||||||
nginx-proxy-manager: {} |
|
||||||
db_data: {} |
db_data: {} |
||||||
nc_data: {} |
nc_data: {} |
||||||
|
nginx-proxy-manager: {} |
||||||
networks: |
|
||||||
default: |
|
||||||
nginxproxy: |
|
||||||
|
@ -1,68 +1,66 @@ |
|||||||
version: '3.9' |
version: "3.9" |
||||||
|
|
||||||
networks: |
networks: |
||||||
frontend: |
|
||||||
external: false |
|
||||||
backend: |
backend: |
||||||
external: false |
external: false |
||||||
|
frontend: |
||||||
|
external: false |
||||||
# This is an example setup with an Nginx reverse proxy. |
# This is an example setup with an Nginx reverse proxy. |
||||||
# If you already have an Nginx reverse proxy running, |
# If you already have an Nginx reverse proxy running, |
||||||
# then allow the docker-compose.yml to reference an external network that the reverse proxy container is on |
# then allow the docker-compose.yml to reference an external network that the reverse proxy container is on |
||||||
# (in lieu of the frontend network in this file) and have the NocoDB container connect to it. |
# (in lieu of the frontend network in this file) and have the NocoDB container connect to it. |
||||||
|
|
||||||
services: |
services: |
||||||
reverse_proxy: |
|
||||||
image: nginx:alpine |
|
||||||
container_name: reverse_proxy |
|
||||||
volumes: |
|
||||||
- ./certbot:/etc/letsencrypt:ro # SSL certs |
|
||||||
- ./nginx:/etc/nginx # Nginx config file |
|
||||||
- path/to/webroot:/usr/share/nginx/html # Mount directory web site files for webroot certificate validation with Certbot |
|
||||||
ports: |
|
||||||
- 80:80 |
|
||||||
- 443:443 |
|
||||||
restart: unless-stopped |
|
||||||
networks: |
|
||||||
- frontend |
|
||||||
|
|
||||||
certbot: |
certbot: |
||||||
image: certbot/certbot |
command: "certonly --webroot --webroot-path=/var/www/html --email user@example.domain --agree-tos --no-eff-email -d example.domain,www.example.domain,nocodb.example.domain" |
||||||
container_name: certbot |
container_name: certbot |
||||||
volumes: |
|
||||||
- ./certbot:/etc/letsencrypt |
|
||||||
- path/to/webroot:/var/www/html # For webroot certificate validation |
|
||||||
depends_on: |
depends_on: |
||||||
- reverse_proxy |
- reverse_proxy |
||||||
command: certonly --webroot --webroot-path=/var/www/html --email user@example.domain --agree-tos --no-eff-email -d example.domain,www.example.domain,nocodb.example.domain |
image: certbot/certbot |
||||||
|
volumes: |
||||||
|
- "./certbot:/etc/letsencrypt" |
||||||
|
- "path/to/webroot:/var/www/html" # For webroot certificate validation |
||||||
nocodb_app: |
nocodb_app: |
||||||
image: nocodb/nocodb:latest |
|
||||||
container_name: nocodb_app |
container_name: nocodb_app |
||||||
restart: unless-stopped |
depends_on: |
||||||
volumes: |
- nocodb_database |
||||||
- ./nocodb/data:/usr/app/data |
environment: |
||||||
|
NC_AUTH_JWT_SECRET: "${NC_AUTH_JWT_SECRET}" |
||||||
|
# while it is not good practice to use the Root user, |
||||||
|
# there were issues with granting privileges to a new user using the Linux server MariaDB image. |
||||||
|
NC_DB: "mysql2://nocodb_database:3306?u=root&p=${MYSQL_ROOT_PASSWORD}&d=${MYSQL_DATABASE}" |
||||||
|
NC_PUBLIC_URL: "${NC_PUBLIC_URL}" |
||||||
|
image: "nocodb/nocodb:latest" |
||||||
networks: |
networks: |
||||||
- backend |
- backend |
||||||
- frontend |
- frontend |
||||||
environment: |
restart: unless-stopped |
||||||
NC_DB: mysql2://nocodb_database:3306?u=root&p=${MYSQL_ROOT_PASSWORD}&d=${MYSQL_DATABASE} # While it is not good practice to use the Root user, there were issues with granting privileges to a new user using the Linuxserver MariaDB image. |
volumes: |
||||||
NC_PUBLIC_URL: ${NC_PUBLIC_URL} |
- "./nocodb/data:/usr/app/data" |
||||||
NC_AUTH_JWT_SECRET: ${NC_AUTH_JWT_SECRET} |
|
||||||
depends_on: |
|
||||||
- nocodb_database |
|
||||||
|
|
||||||
nocodb_database: |
nocodb_database: |
||||||
image: ghcr.io/linuxserver/mariadb:alpine # Using the non-official MariaDB image because it is an alpine distro and has a considerably smaller footprint. |
|
||||||
container_name: nocodb_database |
container_name: nocodb_database |
||||||
volumes: |
|
||||||
- ./mariadb/config:/config |
|
||||||
- ./mariadb/data:/var/lib/mysql |
|
||||||
networks: |
|
||||||
- backend |
|
||||||
restart: always |
|
||||||
environment: |
environment: |
||||||
- MYSQL_ROOT_PASSWORD |
- MYSQL_ROOT_PASSWORD |
||||||
- MYSQL_DATABASE |
- MYSQL_DATABASE |
||||||
- MYSQL_USER |
- MYSQL_USER |
||||||
- MYSQL_PASSWORD |
- MYSQL_PASSWORD |
||||||
|
# using the non-official MariaDB image |
||||||
|
# because it is an alpine distro and has a considerably smaller footprint |
||||||
|
image: "ghcr.io/linuxserver/mariadb:alpine" |
||||||
|
networks: |
||||||
|
- backend |
||||||
|
restart: always |
||||||
|
volumes: |
||||||
|
- "./mariadb/config:/config" |
||||||
|
- "./mariadb/data:/var/lib/mysql" |
||||||
|
reverse_proxy: |
||||||
|
container_name: reverse_proxy |
||||||
|
image: "nginx:alpine" |
||||||
|
networks: |
||||||
|
- frontend |
||||||
|
ports: |
||||||
|
- "80:80" |
||||||
|
- "443:443" |
||||||
|
restart: unless-stopped |
||||||
|
volumes: |
||||||
|
- "./certbot:/etc/letsencrypt:ro" # SSL certs |
||||||
|
- "./nginx:/etc/nginx" # Nginx config file |
||||||
|
- "path/to/webroot:/usr/share/nginx/html" # Mount directory web site files for webroot certificate validation with Certbot |
@ -1,32 +1,31 @@ |
|||||||
version: '2.1' |
version: '2.1' |
||||||
|
|
||||||
services: |
services: |
||||||
|
nocodb: |
||||||
|
depends_on: |
||||||
root_db: |
root_db: |
||||||
image: postgres |
condition: service_healthy |
||||||
|
environment: |
||||||
|
NC_DB: "pg://root_db:5432?u=postgres&p=password&d=root_db" |
||||||
|
image: "nocodb/nocodb:latest" |
||||||
|
ports: |
||||||
|
- "8080:8080" |
||||||
restart: always |
restart: always |
||||||
volumes: |
volumes: |
||||||
- db_data:/var/lib/postgresql/data |
- "nc_data:/usr/app/data" |
||||||
|
root_db: |
||||||
environment: |
environment: |
||||||
|
POSTGRES_DB: root_db |
||||||
POSTGRES_PASSWORD: password |
POSTGRES_PASSWORD: password |
||||||
POSTGRES_USER: postgres |
POSTGRES_USER: postgres |
||||||
POSTGRES_DB: root_db |
|
||||||
healthcheck: |
healthcheck: |
||||||
test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" |
|
||||||
interval: 10s |
interval: 10s |
||||||
timeout: 2s |
|
||||||
retries: 10 |
retries: 10 |
||||||
nocodb: |
test: "pg_isready -U \"$$POSTGRES_USER\" -d \"$$POSTGRES_DB\"" |
||||||
depends_on: |
timeout: 2s |
||||||
root_db: |
image: postgres |
||||||
condition: service_healthy |
|
||||||
image: nocodb/nocodb:latest |
|
||||||
ports: |
|
||||||
- "8080:8080" |
|
||||||
restart: always |
restart: always |
||||||
volumes: |
volumes: |
||||||
- nc_data:/usr/app/data |
- "db_data:/var/lib/postgresql/data" |
||||||
environment: |
|
||||||
NC_DB: "pg://root_db:5432?u=postgres&p=password&d=root_db" |
|
||||||
volumes: |
volumes: |
||||||
db_data: {} |
db_data: {} |
||||||
nc_data: {} |
nc_data: {} |
||||||
|
Loading…
Reference in new issue