diff --git a/.env b/.env index 553a1ec..224663b 100644 --- a/.env +++ b/.env @@ -3,7 +3,9 @@ API_SECRET=nyEX8BZ44KqTXeV2 # API configuration API_PORT=8111 -API_RELEASE="Homologação" +API_RELEASE="Desenvolvimento" +#API_RELEASE="Homologação" +#API_RELEASE="" # DB configuration DB_HOST=177.153.50.98 diff --git a/infra/Caddyfile b/infra/Caddyfile new file mode 100644 index 0000000..0011a97 --- /dev/null +++ b/infra/Caddyfile @@ -0,0 +1,8 @@ +http://www.pcastt.com.br, http://pcastt.com.br { + root * /root/sites/pcastt + file_server + + handle_path /api/* { + reverse_proxy localhost:8111 + } +} diff --git a/infra/apihomolog.service b/infra/apihomolog.service new file mode 100644 index 0000000..70d8759 --- /dev/null +++ b/infra/apihomolog.service @@ -0,0 +1,13 @@ +[Unit] +Description=Pcast Homolog API +After=multi-user.target + +[Service] +WorkingDirectory=/root/api-homolog +# RootDirectory=/root/api-homolog +ExecStart=/root/api-homolog/api +Type=simple + +[Install] +WantedBy=multi-user.target + diff --git a/infra/newapi-homolog.sh b/infra/newapi-homolog.sh new file mode 100644 index 0000000..157ca26 --- /dev/null +++ b/infra/newapi-homolog.sh @@ -0,0 +1,4 @@ +service apihomolog stop +cp /home/ftpuser/ftp/files/api /root/api-homolog +chmod 777 api +service apihomolog start