{"id":17357045,"url":"https://github.com/moontai0724/knowledge-king-server","last_synced_at":"2025-08-02T06:32:47.486Z","repository":{"id":56685964,"uuid":"292299500","full_name":"moontai0724/knowledge-king-server","owner":"moontai0724","description":"Knowledge King Server Setup Kit","archived":false,"fork":false,"pushed_at":"2021-07-04T14:48:09.000Z","size":67,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-16T21:33:51.823Z","etag":null,"topics":["docker","docker-compose","dockerfile","mysql","nestjs","nginx","nuxtjs","phpmyadmin","reverse-proxy"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moontai0724.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-02T14:02:25.000Z","updated_at":"2021-07-04T14:48:12.000Z","dependencies_parsed_at":"2022-08-15T23:20:20.320Z","dependency_job_id":null,"html_url":"https://github.com/moontai0724/knowledge-king-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moontai0724%2Fknowledge-king-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moontai0724%2Fknowledge-king-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moontai0724%2Fknowledge-king-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moontai0724%2Fknowledge-king-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moontai0724","download_url":"https://codeload.github.com/moontai0724/knowledge-king-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228446457,"owners_count":17921105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","dockerfile","mysql","nestjs","nginx","nuxtjs","phpmyadmin","reverse-proxy"],"created_at":"2024-10-15T18:59:56.602Z","updated_at":"2024-12-06T10:07:46.979Z","avatar_url":"https://github.com/moontai0724.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Knowledge King Server Setup Kit (Build server environment)\nThis repository is an environment setup kit for Knowledge King server.\n\n# What's Inside?\nThis kit includes following environments:\n- **MySQL**:latest\n- **PHPMyAdmin**:latest\n- **Nginx**:latest\n- front-end server using **node**:latest\n- front-end development using **code-server**:latest\n- back-end development using **code-server**:latest\n- back-end server using **node**:latest\n\nFor which version contains what environment, please check following table:\n\n|    Package \\ Version    | production | production-ssl | development | development-ssl | development-code_server | development-code_server-ssl |\n| :---------------------: | :--------: | :------------: | :---------: | :-------------: | :---------------------: | :-------------------------: |\n|          MySQL          |   √ Yes    |     √ Yes      |    √ Yes    |      √ Yes      |          √ Yes          |            √ Yes            |\n|       PHPMyAdmin        |    × No    |      × No      |    √ Yes    |      √ Yes      |          √ Yes          |            √ Yes            |\n|          Nginx          |   √ Yes    |     √ Yes      |    √ Yes    |      √ Yes      |          √ Yes          |            √ Yes            |\n|           SSL           |    × No    |     √ Yes      |    × No     |      √ Yes      |          × No           |            √ Yes            |\n|        Front-end        |   √ Yes    |     √ Yes      |    √ Yes    |      √ Yes      |          √ Yes          |            √ Yes            |\n| code-server (front-end) |    × No    |      × No      |    × No     |      × No       |          √ Yes          |            √ Yes            |\n|        Back-end         |   √ Yes    |     √ Yes      |    √ Yes    |      √ Yes      |          √ Yes          |            √ Yes            |\n| code-server (back-end)  |    × No    |      × No      |    × No     |      × No       |          √ Yes          |            √ Yes            |\n\n## Web Path\nThis kit is served by Nginx with reverse proxying by path.\nProxied path here:\n```\n├ /                    -\u003e Requests will forward to front-end docker container.\n├ /api/                -\u003e Requests will forward to back-end docker container.\n├ /phpmyadmin/         -\u003e Requests will forward to phpmyadmin docker container.\n├ /front-end-coding/   -\u003e Requests will forward to front-end code-server docker container.\n├ /back-end-coding/    -\u003e Requests will forward to back-end code-server docker container.\n```\n\n# Getting Started\nThis kit is built with **Docker**, please install **Docker** and **Docker-Compose** first.\n```shell\ncurl -sSL https://get.docker.com | sudo sh\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.25.3/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\n```\n\n## Setup environment variable\nCopy example file, then edit values.\n```shell\ncopy .env.example .env\n```\n\n## Set SSL Certificate (Optional, SSL version only)\nIf you're using SSL version, it's necessary to having a SSL certificate.\nTo use SSL, you need to save cert as `cert.pem` and `cert.key` in `./certs`.\n\n## Setup SSH key for (Optional, Development version only)\nIf you're going to development, please don't forget to generate an ssh key, and add it into repo deploy keys.\n```shell\nssh-keygen\n```\n\n## Boot containers\nFor start all these containers, just run this command in root folder of project:\n```shell\ndocker-compose -f docker-compose-{version}.yml up -d --build\n```\nFor example, if you decide to use `production-ssl` version, please use following command:\n```shell\ndocker-compose -f docker-compose-production-ssl.yml up -d --build\n```\nAfter about a minute, all containers should successfully booted.\n\n## MySQL Root Password\nMySQL root password will generate when first-time boot up, keep watching console output for root password to access database.\nIf you run **docker-compose** with `-d` parameter, will detach from containers, you won't be able to watching console output.\n\nIf you missed the output, you can type this command to fetch logs from container for find database password.\n```shell\ndocker logs mysql\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoontai0724%2Fknowledge-king-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoontai0724%2Fknowledge-king-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoontai0724%2Fknowledge-king-server/lists"}