resolve server creation issues

This commit is contained in:
2026-03-19 00:25:25 +01:00
parent 9172f0256f
commit d4b16d80f3
17 changed files with 179 additions and 121 deletions

View File

@@ -31,9 +31,6 @@ func NewDockerRuntime(client *dockerclient.Client, repo *repository.ServerReposi
func (r *DockerRuntime) Create(ctx context.Context, server *model.Server) error {
image := env.GetACCImage()
gameVolume := env.GetACCGameVolume()
configPath := server.GetConfigPath()
portStr := strconv.Itoa(server.Port)
natPort, err := nat.NewPort("tcp", portStr)
if err != nil {
@@ -54,8 +51,7 @@ func (r *DockerRuntime) Create(ctx context.Context, server *model.Server) error
}
binds := []string{
fmt.Sprintf("%s:/acc/game:ro", gameVolume),
fmt.Sprintf("%s:/acc/cfg:rw", configPath),
fmt.Sprintf("%s:/acc/game:rw", server.GetServerPath()),
}
resp, err := r.client.ContainerCreate(ctx, &container.Config{