Bertrand Janvoie
3 years ago
5 changed files with 135 additions and 1 deletions
@ -0,0 +1,17 @@
|
||||
{ |
||||
"serverRoot": "http://localhost:8000", |
||||
"port": 8000, |
||||
"dbtype": "sqlite3", |
||||
"dbconfig": "/var/lib/focalboard/focalboard.db", |
||||
"postgres_dbconfig": "dbname=focalboard sslmode=disable", |
||||
"useSSL": false, |
||||
"webpath": "./pack", |
||||
"filespath": "/var/lib/focalboard/file", |
||||
"telemetry": true, |
||||
"prometheus_address": ":9092", |
||||
"session_expire_time": 2592000, |
||||
"session_refresh_time": 18000, |
||||
"localOnly": false, |
||||
"enableLocalMode": true, |
||||
"localModeSocketLocation": "/var/tmp/focalboard_local.socket" |
||||
} |
@ -0,0 +1,12 @@
|
||||
services: |
||||
focalboard: |
||||
image: jimmymasaru/focalboard:latest |
||||
restart: unless-stopped |
||||
ports: |
||||
- "8000:8000" |
||||
extra_hosts: |
||||
- "host.docker.internal:host-gateway" |
||||
volumes: |
||||
- ./config.json:/opt/focalboard/config.json |
||||
- ./focalboard:/var/lib/focalboard |
||||
|
@ -0,0 +1,70 @@
|
||||
upstream focalboard { |
||||
server localhost:8000; |
||||
keepalive 32; |
||||
} |
||||
|
||||
server { |
||||
|
||||
server_name focalboard.noobtoroot.xyz; |
||||
|
||||
location ~ /ws/* { |
||||
proxy_set_header Upgrade $http_upgrade; |
||||
proxy_set_header Connection "upgrade"; |
||||
client_max_body_size 50M; |
||||
proxy_set_header Host $http_host; |
||||
proxy_set_header X-Real-IP $remote_addr; |
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
proxy_set_header X-Forwarded-Proto $scheme; |
||||
proxy_set_header X-Frame-Options SAMEORIGIN; |
||||
proxy_buffers 256 16k; |
||||
proxy_buffer_size 16k; |
||||
client_body_timeout 60; |
||||
send_timeout 300; |
||||
lingering_timeout 5; |
||||
proxy_connect_timeout 1d; |
||||
proxy_send_timeout 1d; |
||||
proxy_read_timeout 1d; |
||||
proxy_pass http://localhost:8000; |
||||
} |
||||
|
||||
location / { |
||||
client_max_body_size 50M; |
||||
proxy_set_header Connection ""; |
||||
proxy_set_header Host $http_host; |
||||
proxy_set_header X-Real-IP $remote_addr; |
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
proxy_set_header X-Forwarded-Proto $scheme; |
||||
proxy_set_header X-Frame-Options SAMEORIGIN; |
||||
proxy_buffers 256 16k; |
||||
proxy_buffer_size 16k; |
||||
proxy_read_timeout 600s; |
||||
proxy_cache_revalidate on; |
||||
proxy_cache_min_uses 2; |
||||
proxy_cache_use_stale timeout; |
||||
proxy_cache_lock on; |
||||
proxy_http_version 1.1; |
||||
proxy_pass http://localhost:8000; |
||||
} |
||||
|
||||
listen 443 ssl; # managed by Certbot |
||||
ssl_certificate /etc/letsencrypt/live/focalboard.noobtoroot.xyz/fullchain.pem; # managed by Certbot |
||||
ssl_certificate_key /etc/letsencrypt/live/focalboard.noobtoroot.xyz/privkey.pem; # managed by Certbot |
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot |
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot |
||||
|
||||
} |
||||
|
||||
|
||||
server { |
||||
if ($host = focalboard.noobtoroot.xyz) { |
||||
return 301 https://$host$request_uri; |
||||
} # managed by Certbot |
||||
|
||||
|
||||
listen 80; |
||||
|
||||
server_name focalboard.noobtoroot.xyz; |
||||
return 404; # managed by Certbot |
||||
|
||||
|
||||
} |
@ -0,0 +1,35 @@
|
||||
# CHECK DEPENDENCIES |
||||
# { |
||||
#DOCKER |
||||
REQUIRED_PKG="docker" |
||||
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' $REQUIRED_PKG|grep "install ok installed") |
||||
echo Checking for $REQUIRED_PKG: $PKG_OK |
||||
if [ "" = "$PKG_OK" ]; then |
||||
echo "No $REQUIRED_PKG. Setting up $REQUIRED_PKG." |
||||
sudo apt-get --yes install $REQUIRED_PKG |
||||
fi |
||||
|
||||
# DOCKER-COMPOSE |
||||
REQUIRED_PKG="docker-compose" |
||||
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' $REQUIRED_PKG|grep "install ok installed") |
||||
echo Checking for $REQUIRED_PKG: $PKG_OK |
||||
if [ "" = "$PKG_OK" ]; then |
||||
echo "No $REQUIRED_PKG. Setting up $REQUIRED_PKG." |
||||
curl -L "https://github.com/docker/compose/releases/download/$(curl https://github.com/docker/compose/releases | grep -m1 '<a href="/docker/compose/releases/download/' | grep -o 'v[0-9:].[0-9].[0-9]')/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose |
||||
fi |
||||
# } |
||||
|
||||
# COPY NGINX CONF TO NGINX FOLDER |
||||
cp ./focalboard.noobtoroot.xyz /etc/nginx/sites-available/ |
||||
|
||||
# CREATE A SYMBOLIQUE LINK FOR NGINX |
||||
ln -s /etc/nginx/sites-available/focalboard.noobtoroot.xyz /etc/nginx/sites-enabled/ |
||||
|
||||
# INSTALL GITEA FROM DOCKER-COMPOSE FILE |
||||
docker-compose up -d |
||||
|
||||
# USE CERTBOT FOR MAKE SSL CERTIFICATE |
||||
certbot --nginx -d focalboard.noobtoroot.xyz |
||||
|
||||
# DONE |
||||
echo "URL='focalboard.noobtoroot.xyz' PORT='8000'" |
Loading…
Reference in new issue