This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
598 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"python.formatting.provider": "black", | ||
"python.pythonPath": "/opt/anaconda3/envs/fk/bin/python", | ||
"python.pythonPath": "/Users/monius/anaconda3/envs/fk/bin/python", | ||
"python.linting.pylintEnabled": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
docker run --name {{domain}} -d -p 5432:5432 \ | ||
-v ~/{{domain}}:/var/lib/postgresql/data \ | ||
-e POSTGRES_DB={{domain}} -e POSTGRES_USER={{usr}} -e POSTGRES_PASSWORD='{{domain}}' \ | ||
docker run --name {{DOMAIN}} -d -p 5432:5432 \ | ||
-v ~/{{DOMAIN}}:/var/lib/postgresql/data \ | ||
-e POSTGRES_DB={{DOMAIN}} -e POSTGRES_USER={{usr}} -e POSTGRES_PASSWORD='{{DOMAIN}}' \ | ||
postgres:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export {{OP1}} | ||
export {{OP2}} | ||
|
||
sudo apt install socat -y | ||
|
||
sudo wget -O - https://get.acme.sh | sh | ||
|
||
sudo ~/.acme.sh/acme.sh --force --issue -d "*.{{DOMAIN}}" -d "{{DOMAIN}}" --dns {{DNS_OP}} \ | ||
--cert-file /etc/nginx/certs/site.crt \ | ||
--key-file /etc/nginx/certs/site.key \ | ||
--fullchain-file /etc/nginx/certs/fullchain.crt \ | ||
--ca-file /etc/nginx/certs/ca.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
from config import * | ||
from validation import * | ||
from utils import * | ||
|
||
import subprocess | ||
import getpass | ||
import os | ||
import click | ||
|
||
@click.command(context_settings=dict( | ||
allow_extra_args=True | ||
)) | ||
@click.option('--dns_type', prompt='Service options. \n [1] CloudFlare \n [2] AliYun \n\n\nYour Choice') | ||
@click.pass_context | ||
def miss_ssl(ctx,dns_type): | ||
""" | ||
These are available DNS provider servie options. \n | ||
[1] CloudFlare <CF_Email,CF_Key> --dns dns_cf \n | ||
[2] AliYun <Ali_Key,Ali_Secret> --dns dns_ali \n | ||
""" | ||
# if not dns_type: | ||
if(str(dns_type)=="1"): | ||
try: | ||
op_cf() | ||
except JumpOutFuckingClick2: | ||
pass | ||
if(str(dns_type)=="2"): | ||
try: | ||
op_ali() | ||
except JumpOutFuckingClick2: | ||
pass | ||
raise JumpOutFuckingClick | ||
|
||
|
||
@click.command(short_help='AliYun Option',context_settings=dict( | ||
allow_extra_args=True | ||
)) | ||
@click.option('--ali_key', prompt='Ali_Key') | ||
@click.option('--ali_secret', prompt='Ali_Secret') | ||
@click.pass_context | ||
def op_ali(ctx,ali_key,ali_secret): | ||
dns_op = "dns_ali" | ||
op_1 = "Ali_Key={}".format(ali_key) | ||
op_2 = "Ali_Secret={}".format(ali_secret) | ||
ssl_multi_gen(DOMAIN, USR, CUR_LOC, op_1,op_2,dns_op) | ||
|
||
raise JumpOutFuckingClick2 | ||
|
||
@click.command(short_help='CloudFlare Option',context_settings=dict( | ||
allow_extra_args=True | ||
)) | ||
@click.option('--cf_email', prompt='CF_Email') | ||
@click.option('--cf_key', prompt='CF_Key') | ||
@click.pass_context | ||
def op_cf(ctx,cf_email,cf_key): | ||
dns_op = "dns_cf" | ||
op_1 = "CF_Email={}".format(cf_email) | ||
op_2 = "CF_Key={}".format(cf_key) | ||
ssl_multi_gen(DOMAIN, USR, CUR_LOC, op_1,op_2,dns_op) | ||
|
||
raise JumpOutFuckingClick2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
import os | ||
|
||
path_to_module = os.path.dirname(__file__) | ||
# Configurations | ||
|
||
uWSGI = os.path.join(path_to_module, "..","data", "uwsgi_config.ini") | ||
NGINX = os.path.join(path_to_module, "..","data", "nginx_config.conf") | ||
SSL = os.path.join(path_to_module, "..","data", "multi_ssl.sh") | ||
SERVICE = os.path.join(path_to_module, "..","data", "systemd_script.service") | ||
DOCKER = os.path.join(path_to_module, "..","data", "docker_config.run") | ||
# uWSGI = "./" | ||
# = "./data/" | ||
|
||
# = "./data/" | ||
# = "./data/ | ||
# = "./data/ | ||
|
||
# May need to change | ||
NGINX_CONF1 = "/etc/nginx/sites-enabled/" | ||
NGINX_CONF2 = "/etc/nginx/sites-available/" | ||
SYSTEMD_CONF = "/etc/systemd/system/" | ||
|
||
# SET ENV | ||
|
||
DOMAIN = None | ||
USR = None | ||
CUR_LOC = None |
Oops, something went wrong.