added config file for auth on nginx
This commit is contained in:
parent
c452bbe94a
commit
596663724a
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
ruby '3.0.2'
|
ruby '3.2.2'
|
||||||
#ruby '2.6.10'
|
#ruby '2.6.10'
|
||||||
|
|
||||||
gem 'sinatra'
|
gem 'sinatra'
|
||||||
|
|
|
@ -19,11 +19,13 @@ GEM
|
||||||
rack-protection (= 3.1.0)
|
rack-protection (= 3.1.0)
|
||||||
tilt (~> 2.0)
|
tilt (~> 2.0)
|
||||||
sqlite3 (1.6.9-x64-mingw-ucrt)
|
sqlite3 (1.6.9-x64-mingw-ucrt)
|
||||||
|
sqlite3 (1.6.9-x86_64-linux)
|
||||||
tilt (2.3.0)
|
tilt (2.3.0)
|
||||||
webrick (1.8.1)
|
webrick (1.8.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
x64-mingw-ucrt
|
x64-mingw-ucrt
|
||||||
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
bcrypt
|
bcrypt
|
||||||
|
|
|
@ -9,21 +9,21 @@ def initialize_database
|
||||||
file_path = DATA_LOCATION + FILE_STORAGE_LOCATION
|
file_path = DATA_LOCATION + FILE_STORAGE_LOCATION
|
||||||
|
|
||||||
puts "Checking if directory '#{DATA_LOCATION}' exists."
|
puts "Checking if directory '#{DATA_LOCATION}' exists."
|
||||||
unless Dir.exist(DATA_LOCATION)
|
unless Dir.exist?(DATA_LOCATION)
|
||||||
puts "Directory '#{DATA_LOCATION}' does not exist."
|
puts "Directory '#{DATA_LOCATION}' does not exist."
|
||||||
Dir.mkdir(DATA_LOCATION)
|
Dir.mkdir(DATA_LOCATION)
|
||||||
puts "Directory '#{DATA_LOCATION}' created successfully."
|
puts "Directory '#{DATA_LOCATION}' created successfully."
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "Checking if directory '#{database_path}' exists."
|
puts "Checking if directory '#{database_path}' exists."
|
||||||
unless Dir.exist(database_path)
|
unless Dir.exist?(database_path)
|
||||||
puts "Directory '#{database_path}' does not exist."
|
puts "Directory '#{database_path}' does not exist."
|
||||||
Dir.mkdir(database_path)
|
Dir.mkdir(database_path)
|
||||||
puts "Directory '#{database_path}' created successfully."
|
puts "Directory '#{database_path}' created successfully."
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "Checking if directory '#{file_path}' exists."
|
puts "Checking if directory '#{file_path}' exists."
|
||||||
unless Dir.exist(file_path)
|
unless Dir.exist?(file_path)
|
||||||
puts "Directory '#{file_path}' does not exist."
|
puts "Directory '#{file_path}' does not exist."
|
||||||
Dir.mkdir(file_path)
|
Dir.mkdir(file_path)
|
||||||
puts "Directory '#{file_path}' created successfully."
|
puts "Directory '#{file_path}' created successfully."
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
server {
|
||||||
|
server_name auth.roysathome.net;
|
||||||
|
location / {
|
||||||
|
set $backend http://127.0.0.1:47706;
|
||||||
|
proxy_pass $backend;
|
||||||
|
proxy_set_header Host git.roysathome.net; #$host;
|
||||||
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue