mirror of https://github.com/nocodb/nocodb
starbirdtech383
10 months ago
12 changed files with 134 additions and 13 deletions
@ -1 +1,2 @@
|
||||
NC_INSTALL_ROOT=./ |
||||
NO_COLOR=NEST_JS_LOG_MESSAGE_NO_COLOR_SET_NON_NULL_VALUE |
@ -0,0 +1,23 @@
|
||||
# Advanced operations |
||||
|
||||
|
||||
## Restarting containers |
||||
|
||||
## Upgrade nocodb instance |
||||
|
||||
## Enable SSL |
||||
In order to enable SSL for incoming https requests, you will need to have certs which is |
||||
private-key public-key pair |
||||
### letsencrypt for generating certificates |
||||
### Bring your own certificates |
||||
### self signed certificates |
||||
|
||||
## Database pasword rotation |
||||
|
||||
## nginx configurations |
||||
|
||||
## Add Node |
||||
|
||||
## Minio integration for resources |
||||
|
||||
## Enable scheduled backups to run nightly on all your instances. |
@ -0,0 +1,15 @@
|
||||
server { |
||||
listen 80; |
||||
listen [::]:80; |
||||
|
||||
# chantge server_name while generating cert |
||||
server_name <SERVER_NAME>; |
||||
|
||||
#access_log /var/log/nginx/host.access.log main; |
||||
|
||||
# this is required for cert generation. |
||||
# change server_name as well with cname of required cert |
||||
location /.well-known/acme-challenge/ { |
||||
root /var/www/certbot; |
||||
} |
||||
} |
@ -0,0 +1,41 @@
|
||||
server { |
||||
listen 80; |
||||
listen [::]:80 ; |
||||
listen 443 default_server ssl; |
||||
listen [::]:443 ssl ; |
||||
# chantge server_name while generating cert |
||||
server_name <SERVER_NAME>; |
||||
|
||||
# force https-redirects |
||||
if ($scheme = http) { |
||||
return 301 https://$server_name$request_uri; |
||||
} |
||||
|
||||
ssl_certificate /etc/nginx/ssl/live/<SERVER_NAME>/fullchain.pem; |
||||
ssl_certificate_key /etc/nginx/ssl/live/<SERVER_NAME>/privkey.pem; |
||||
|
||||
#access_log /var/log/nginx/host.access.log main; |
||||
location / { |
||||
include /etc/nginx/mime.types; |
||||
root /opt/nocohub/nginx/data/<SERVER_NAME>/; |
||||
index index.html index.htm; |
||||
auth_basic "Restricted Access"; |
||||
auth_basic_user_file /opt/nocohub/nginx/conf/.htpasswd; |
||||
} |
||||
|
||||
location /proxy { |
||||
proxy_pass http://nocohub-001:8080; |
||||
proxy_set_header Host $host; |
||||
proxy_set_header X-Real-IP $remote_addr; |
||||
|
||||
auth_basic "Restricted Access"; |
||||
auth_basic_user_file /opt/nocohub/nginx/conf/.htpasswd; |
||||
} |
||||
|
||||
# deny access to .htaccess files, if Apache's document root |
||||
# concurs with nginx's one |
||||
# |
||||
location ~ /\.ht { |
||||
deny all; |
||||
} |
||||
} |
@ -0,0 +1,32 @@
|
||||
#!/bin/bash |
||||
# expects nginx to be up and running with conf.d/certbot.conf |
||||
# dns to be mapped to the machine where cert is generated |
||||
# |
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) |
||||
|
||||
SERVER_NAME=${1} |
||||
if [[ -z "$SERVER_NAME" ]] |
||||
then |
||||
echo "required argument servername" |
||||
echo "usage ex: ./gen_certs my.nocodb.com" |
||||
exit 1 |
||||
fi |
||||
|
||||
echo "Creating configs for SERVER_NAME: ${SERVER_NAME}" |
||||
cd ${SCRIPT_DIR}/../conf/nginx/conf.d |
||||
sed "s,<SERVER_NAME>,${SERVER_NAME},g" ${SCRIPT_DIR}/../nginx/conf-templates/certbot_conf.template > certbot.conf |
||||
|
||||
cd ${SCRIPT_DIR}/../bin |
||||
./nginx_start.sh |
||||
./nginx_reload.sh |
||||
|
||||
echo "Triggering certbot to create ssl configs: ${SERVER_NAME}" |
||||
cd ${SCRIPT_DIR}/.. |
||||
docker-compose run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ -d ${SERVER_NAME} |
||||
|
||||
|
||||
echo "Now reload nginx with new ssl configs for your site : ${SERVER_NAME}" |
||||
cd ${SCRIPT_DIR}/../conf/nginx/conf.d |
||||
sed "s,<SERVER_NAME>,${SERVER_NAME},g" ${SCRIPT_DIR}/../nginx/conf-templates/ssl_server_name_conf.template > ${SERVER_NAME}.conf |
||||
${SCRIPT_DIR}/../bin/nginx_reload.sh |
@ -1,3 +1,7 @@
|
||||
nocodb_install_version="1.0.0" # Replace with actual version |
||||
REQUIRED_PORTS=(80 443) |
||||
DOCKER_IMAGES=("redis:latest" "postgres:14.7" "nocodb/nocodb:latest" "nginx") |
||||
DOCKER_IMAGES=("redis:latest" "postgres:14.7" "nocodb/nocodb:latest" "nginx" "certbot/certbot:latest" ) |
||||
|
||||
# Array of properties with default values |
||||
properties=( "POSTGRES_USER=postgres" "POSTGRES_PASSWORD=test123" "POSTGRES_DB=nocodb" "NC_REDIS_URL=redis://redis:6379/4" 'NC_DB=pg://postgres:5432?u=postgres&password=${POSTGRES_PASSWORD:-nocodb}&d=postgres' ) |
||||
# "NC_INSTALL_ROOT=${SCRIPT_DIR}" "MINIO_ROOT_USER=minioadmin" "MINIO_ROOT_PASSWORD=minioadmin" |
Loading…
Reference in new issue