Merge remote-tracking branch 'origin/master' into accounts
This commit is contained in:
commit
17940cae0f
|
@ -11,4 +11,4 @@ if ($request_method = 'OPTIONS') {
|
||||||
more_set_headers 'Access-Control-Allow-Origin: *';
|
more_set_headers 'Access-Control-Allow-Origin: *';
|
||||||
more_set_headers 'Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE';
|
more_set_headers 'Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE';
|
||||||
more_set_headers 'Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
|
more_set_headers 'Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
|
||||||
more_set_headers 'Access-Control-Expose-Headers: Content-Length,Content-Range,Skynet-File-Metadata,Skynet-Skylink';
|
more_set_headers 'Access-Control-Expose-Headers: Content-Length,Content-Range,Skynet-File-Metadata,Skynet-Skylink,Skynet-Portal-Api';
|
||||||
|
|
|
@ -25,6 +25,7 @@ worker_processes 1;
|
||||||
|
|
||||||
#pid logs/nginx.pid;
|
#pid logs/nginx.pid;
|
||||||
|
|
||||||
|
env SKYNET_PORTAL_API; # declare env variable to use it in config
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 1024;
|
worker_connections 1024;
|
||||||
|
@ -62,6 +63,9 @@ http {
|
||||||
|
|
||||||
#gzip on;
|
#gzip on;
|
||||||
|
|
||||||
|
# include skynet-portal-api header on every request
|
||||||
|
header_filter_by_lua 'ngx.header["Skynet-Portal-Api"] = os.getenv("SKYNET_PORTAL_API")';
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
include /etc/nginx/conf.extra.d/*.conf;
|
include /etc/nginx/conf.extra.d/*.conf;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,13 +11,13 @@
|
||||||
"fontsource-metropolis": "4.0.0",
|
"fontsource-metropolis": "4.0.0",
|
||||||
"gatsby": "2.32.3",
|
"gatsby": "2.32.3",
|
||||||
"gatsby-image": "2.11.0",
|
"gatsby-image": "2.11.0",
|
||||||
"gatsby-plugin-manifest": "2.11.0",
|
"gatsby-plugin-manifest": "2.12.0",
|
||||||
"gatsby-plugin-matomo": "0.9.0",
|
"gatsby-plugin-matomo": "0.9.0",
|
||||||
"gatsby-plugin-react-helmet": "3.10.0",
|
"gatsby-plugin-react-helmet": "3.10.0",
|
||||||
"gatsby-plugin-remove-serviceworker": "1.0.0",
|
"gatsby-plugin-remove-serviceworker": "1.0.0",
|
||||||
"gatsby-plugin-robots-txt": "1.5.5",
|
"gatsby-plugin-robots-txt": "1.5.5",
|
||||||
"gatsby-plugin-sass": "3.1.0",
|
"gatsby-plugin-sass": "3.2.0",
|
||||||
"gatsby-source-filesystem": "2.10.0",
|
"gatsby-source-filesystem": "2.11.0",
|
||||||
"http-status-codes": "2.1.4",
|
"http-status-codes": "2.1.4",
|
||||||
"js-cookie": "^2.2.1",
|
"js-cookie": "^2.2.1",
|
||||||
"jsonp": "0.2.1",
|
"jsonp": "0.2.1",
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
"react": "17.0.1",
|
"react": "17.0.1",
|
||||||
"react-countup": "4.3.3",
|
"react-countup": "4.3.3",
|
||||||
"react-dom": "17.0.1",
|
"react-dom": "17.0.1",
|
||||||
"react-dropzone": "11.2.4",
|
"react-dropzone": "11.3.1",
|
||||||
"react-helmet": "6.1.0",
|
"react-helmet": "6.1.0",
|
||||||
"react-mailchimp-form": "1.0.2",
|
"react-mailchimp-form": "1.0.2",
|
||||||
"react-mailchimp-subscribe": "2.1.0",
|
"react-mailchimp-subscribe": "2.1.0",
|
||||||
|
@ -36,9 +36,9 @@
|
||||||
"skynet-js": "3.0.0"
|
"skynet-js": "3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cypress": "6.3.0",
|
"cypress": "6.5.0",
|
||||||
"cypress-file-upload": "5.0.2",
|
"cypress-file-upload": "5.0.2",
|
||||||
"eslint": "7.19.0",
|
"eslint": "7.20.0",
|
||||||
"eslint-config-prettier": "7.2.0",
|
"eslint-config-prettier": "7.2.0",
|
||||||
"eslint-plugin-cypress": "2.11.2",
|
"eslint-plugin-cypress": "2.11.2",
|
||||||
"eslint-plugin-react": "7.22.0",
|
"eslint-plugin-react": "7.22.0",
|
||||||
|
|
|
@ -22,6 +22,7 @@ docker-compose --version # sanity check
|
||||||
|
|
||||||
# Create dummy .env file for docker-compose usage with variables
|
# Create dummy .env file for docker-compose usage with variables
|
||||||
# * DOMAIN_NAME - the domain name your server is using ie. example.com
|
# * DOMAIN_NAME - the domain name your server is using ie. example.com
|
||||||
|
# * SKYNET_PORTAL_API - absolute url to the portal api ie. https://example.com
|
||||||
# * EMAIL_ADDRESS - this is the administrator contact email you need to supply for communication regarding SSL certification
|
# * EMAIL_ADDRESS - this is the administrator contact email you need to supply for communication regarding SSL certification
|
||||||
# * HSD_API_KEY - this is auto generated secure key for your handshake service integration
|
# * HSD_API_KEY - this is auto generated secure key for your handshake service integration
|
||||||
# * CLOUDFLARE_AUTH_TOKEN - (optional) if using cloudflare as dns loadbalancer (need to change it in Caddyfile too)
|
# * CLOUDFLARE_AUTH_TOKEN - (optional) if using cloudflare as dns loadbalancer (need to change it in Caddyfile too)
|
||||||
|
@ -41,7 +42,7 @@ docker-compose --version # sanity check
|
||||||
# * CR_CLUSTER_NODES - (optional) if using `accounts` the list of servers (with ports) which make up your CockroachDB cluster, e.g. `helsinki.siasky.net:26257,germany.siasky.net:26257,us-east.siasky.net:26257`
|
# * CR_CLUSTER_NODES - (optional) if using `accounts` the list of servers (with ports) which make up your CockroachDB cluster, e.g. `helsinki.siasky.net:26257,germany.siasky.net:26257,us-east.siasky.net:26257`
|
||||||
if ! [ -f /home/user/skynet-webportal/.env ]; then
|
if ! [ -f /home/user/skynet-webportal/.env ]; then
|
||||||
HSD_API_KEY=$(openssl rand -base64 32) # generate safe random key for handshake
|
HSD_API_KEY=$(openssl rand -base64 32) # generate safe random key for handshake
|
||||||
printf "DOMAIN_NAME=example.com\nEMAIL_ADDRESS=email@example.com\nSIA_WALLET_PASSWORD=\nHSD_API_KEY=${HSD_API_KEY}\nCLOUDFLARE_AUTH_TOKEN=\nAWS_ACCESS_KEY_ID=\nAWS_SECRET_ACCESS_KEY=\nPORTAL_NAME=\nDISCORD_BOT_TOKEN=\n" > /home/user/skynet-webportal/.env
|
printf "DOMAIN_NAME=example.com\nSKYNET_PORTAL_API=https://example.com\nEMAIL_ADDRESS=email@example.com\nSIA_WALLET_PASSWORD=\nHSD_API_KEY=${HSD_API_KEY}\nCLOUDFLARE_AUTH_TOKEN=\nAWS_ACCESS_KEY_ID=\nAWS_SECRET_ACCESS_KEY=\nPORTAL_NAME=\nDISCORD_BOT_TOKEN=\n" > /home/user/skynet-webportal/.env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start docker container with nginx and client
|
# Start docker container with nginx and client
|
||||||
|
|
Reference in New Issue