Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish the script for deploying in docker #24

Merged
merged 1 commit into from
Aug 10, 2024
Merged

Conversation

Kaiser-Yang
Copy link
Contributor

@Kaiser-Yang Kaiser-Yang commented Aug 10, 2024

In this commit, we finish the script for deploying in docker. We found that systemd can not be used in docker, so we use Sys V Init to start a service in docker.

This commit is related with #8.

Those below are not finished yet:

  • Create database automatically.

通过设置 deployWithDocker 可以在 docker 中进行部署。

配置文件中提供了相关的参数的说明。

由于在 docker 中如果不使用 --privileged=true 进行创建是不能使用 bus 的,因此 systemd 的部署方式在 docker 中会失效。而如果开启特权模式,可能会影响容器于物理机的隔离效果,因此在部署的时候,如果采用容器部署,那么则通过传统的 Sys Init V 的方式部署。

脚本运行结果如下图所示:

image

从浏览器打开的结果:

image

需要注意的的是,如果 docker 运行在 wsl2 中并且开启了 mirrored 模式网络,docker 的端口转发会出现问题。一个简单的解决方法可以修改 /etc/docker/daemon.json:

{
    "iptables": false
}

容器信息:

image

@Kaiser-Yang Kaiser-Yang added documentation Improvements or additions to documentation project initialization Building the project framework for the first time labels Aug 10, 2024
@Kaiser-Yang Kaiser-Yang force-pushed the kaiser-init branch 5 times, most recently from e9b4576 to 4ae8e63 Compare August 10, 2024 08:29
@ajiankexx ajiankexx requested review from ajiankexx and removed request for ajiankexx August 10, 2024 10:35
In this commit, we finish the script for deploying in docker. We found
that `systemd` can not be used in docker, so we use `Sys V Init` to
start a service in docker.

This commit is related with #8.

Those below are not finished yet:
* Create database automatically.
@luckygalaxy666 luckygalaxy666 merged commit cf4baf8 into develop Aug 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation project initialization Building the project framework for the first time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants