add doc root.
Some checks failed
Deploy / Build (push) Failing after 3m24s

This commit is contained in:
amass 2024-11-20 21:10:31 +08:00
parent 06c399c472
commit 1e67b110fe
4 changed files with 7 additions and 7 deletions

View File

@ -23,7 +23,7 @@ jobs:
ssh-keyscan -t ed25519 -p 22022 frp-by1.wwvvww.cn >> ~/.ssh/known_hosts ssh-keyscan -t ed25519 -p 22022 frp-by1.wwvvww.cn >> ~/.ssh/known_hosts
- name: Clone repository - name: Clone repository
run: | run: |
echo "git clone --depth 1 --branch=${GITHUB_REF##*/} ssh://git@frp-by1.wwvvww.cn:22022/${{ gitea.repository }}.git" echo "git clone --depth 10 --branch=${GITHUB_REF##*/} ssh://git@frp-by1.wwvvww.cn:22022/${{ gitea.repository }}.git"
git clone --depth 1 --branch=${GITHUB_REF##*/} ssh://git@frp-by1.wwvvww.cn:22022/${{ gitea.repository }}.git . git clone --depth 1 --branch=${GITHUB_REF##*/} ssh://git@frp-by1.wwvvww.cn:22022/${{ gitea.repository }}.git .
git checkout ${GITHUB_SHA} git checkout ${GITHUB_SHA}
- name: Notify-Start - name: Notify-Start

View File

@ -70,8 +70,8 @@ int main(int argc, char const *argv[]) {
BOOST_ASSERT_MSG(!application->getServer().empty(), "server.empty() == true"); BOOST_ASSERT_MSG(!application->getServer().empty(), "server.empty() == true");
auto address = boost::asio::ip::make_address(application->getServer()); auto address = boost::asio::ip::make_address(application->getServer());
auto listener = std::make_shared<Listener>(application->ioContext(), auto listener =
boost::asio::ip::tcp::endpoint{address, application->getPort()}); std::make_shared<Listener>(application->ioContext(), boost::asio::ip::tcp::endpoint{address, application->getPort()});
listener->startAccept(); listener->startAccept();
auto wechatContext = Singleton<WeChatContext>::instance<Construct>(application->ioContext()); auto wechatContext = Singleton<WeChatContext>::instance<Construct>(application->ioContext());
@ -101,7 +101,7 @@ int main(int argc, char const *argv[]) {
auto udpServer = std::make_shared<UdpServer>(application->ioContext()); auto udpServer = std::make_shared<UdpServer>(application->ioContext());
auto mediaServer = std::make_shared<MediaServer>(554, false); auto mediaServer = std::make_shared<MediaServer>(554, false);
auto webApp = Singleton<WebApplication>::instance<Construct>(application->getWtPort()); auto webApp = Singleton<WebApplication>::instance<Construct>(application->getWtPort(), application->getDocumentRoot());
using namespace boost::asio::ip; using namespace boost::asio::ip;
auto proxyAddress = make_address(application->getServer()); auto proxyAddress = make_address(application->getServer());

View File

@ -14,11 +14,11 @@
#include <Wt/WServer.h> #include <Wt/WServer.h>
#include <format> #include <format>
WebApplication::WebApplication(uint16_t port) { WebApplication::WebApplication(uint16_t port, const std::string &documentRoot) {
try { try {
std::vector<std::string> args; std::vector<std::string> args;
args.push_back("--approot=./build"); args.push_back("--approot=./build");
args.push_back("--docroot=./build"); args.push_back(std::format("--docroot={}", documentRoot));
args.push_back("--config=resources/wt_config.xml"); args.push_back("--config=resources/wt_config.xml");
args.push_back(std::format("--http-listen=127.0.0.1:{}", port)); args.push_back(std::format("--http-listen=127.0.0.1:{}", port));
// --docroot=. --no-compression --http-listen 127.0.0.1:8855 // --docroot=. --no-compression --http-listen 127.0.0.1:8855

View File

@ -31,7 +31,7 @@ public:
const Wt::Auth::PasswordService &passwordService(); const Wt::Auth::PasswordService &passwordService();
protected: protected:
WebApplication(uint16_t port); WebApplication(uint16_t port, const std::string &documentRoot);
static std::unique_ptr<Wt::Dbo::SqlConnectionPool> createConnectionPool(const std::string &sqlite3); static std::unique_ptr<Wt::Dbo::SqlConnectionPool> createConnectionPool(const std::string &sqlite3);
std::unique_ptr<Wt::WApplication> createApplication(const Wt::WEnvironment &env, bool embedded); std::unique_ptr<Wt::WApplication> createApplication(const Wt::WEnvironment &env, bool embedded);