From d78071a4c02f5a59a0f3482241093c71447ddbea Mon Sep 17 00:00:00 2001 From: Nilo Roberto da Cruz Paim Date: Fri, 27 Jan 2023 17:38:07 -0300 Subject: [PATCH] saved copies of more server important files --- .env | 2 +- infra/Caddyfile | 11 ++++++++++- infra/api.service | 13 +++++++++++++ infra/newapi.sh | 4 ++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 infra/api.service create mode 100644 infra/newapi.sh diff --git a/.env b/.env index 224663b..66e8d14 100644 --- a/.env +++ b/.env @@ -3,7 +3,7 @@ API_SECRET=nyEX8BZ44KqTXeV2 # API configuration API_PORT=8111 -API_RELEASE="Desenvolvimento" +#API_RELEASE="Desenvolvimento" #API_RELEASE="Homologação" #API_RELEASE="" diff --git a/infra/Caddyfile b/infra/Caddyfile index 0011a97..eb056c2 100644 --- a/infra/Caddyfile +++ b/infra/Caddyfile @@ -1,4 +1,4 @@ -http://www.pcastt.com.br, http://pcastt.com.br { +http://www.pcastt.com.br, http://pcastt.com.br, https://www.pcastt.com.br, https://pcastt.com.br { root * /root/sites/pcastt file_server @@ -6,3 +6,12 @@ http://www.pcastt.com.br, http://pcastt.com.br { reverse_proxy localhost:8111 } } + +http://www.pcastlive.com.br, http://pcastlive.com.br, https://www.pcastlive.com.br, https://pcastlive.com.br { + root * /root/sites/pcastlive + file_server + + handle_path /api/* { + reverse_proxy localhost:8112 + } +} diff --git a/infra/api.service b/infra/api.service new file mode 100644 index 0000000..77379bd --- /dev/null +++ b/infra/api.service @@ -0,0 +1,13 @@ +[Unit] +Description=Pcast Production API +After=multi-user.target + +[Service] +WorkingDirectory=/root/api +# RootDirectory=/root/api-homolog +ExecStart=/root/api/api +Type=simple + +[Install] +WantedBy=multi-user.target + diff --git a/infra/newapi.sh b/infra/newapi.sh new file mode 100644 index 0000000..709f37b --- /dev/null +++ b/infra/newapi.sh @@ -0,0 +1,4 @@ +service api stop +cp /home/ftpuser/ftp/files/api /root/api +chmod 777 /root//api/api +service api start