Compare commits
3 commits
a08f9ce5a0
...
5429a4147e
| Author | SHA1 | Date | |
|---|---|---|---|
| 5429a4147e | |||
| 481a0782c5 | |||
| 7713c2e55d |
9 changed files with 306 additions and 73 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "makeshift.wiki"]
|
||||||
|
path = makeshift.wiki
|
||||||
|
url = https://git.towk2.me/towk/makeshift.wiki.git
|
||||||
31
Dockerfile
31
Dockerfile
|
|
@ -1,14 +1,27 @@
|
||||||
FROM cgr.dev/chainguard/wolfi-base
|
FROM alpine:latest AS builder
|
||||||
|
|
||||||
RUN apk add --no-cache tini bash
|
RUN apk add go git gcc binutils bash
|
||||||
RUN mkdir -p /configurator
|
|
||||||
|
|
||||||
# nobody 65534:65534
|
WORKDIR /tmp
|
||||||
USER 65534:65534
|
RUN git clone https://git.towk2.me/towk/makeshift.git
|
||||||
|
|
||||||
# copy the binary and all of the default plugins
|
WORKDIR /tmp/makeshift
|
||||||
COPY configurator /configurator/configurator
|
|
||||||
|
|
||||||
CMD ["/configurator/configurator"]
|
RUN go mod tidy && \
|
||||||
|
go build && \
|
||||||
|
mkdir tmp && \
|
||||||
|
./makeshift plugins compile ./pkg/plugins/jinja2/jinja2.go -o ./tmp/plugins/jinja.so
|
||||||
|
|
||||||
ENTRYPOINT [ "/sbin/tini", "--" ]
|
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
|
||||||
|
COPY --from=builder /tmp/makeshift/makeshift /usr/local/bin
|
||||||
|
COPY --from=builder /tmp/makeshift/tmp/plugins/* /makeshift/server/plugins/
|
||||||
|
|
||||||
|
RUN chmod +x /usr/local/bin/makeshift
|
||||||
|
|
||||||
|
RUN mkdir -p /makeshift/logs && \
|
||||||
|
touch /makeshift/logs/makeshift.log
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/local/bin/makeshift"]
|
||||||
115
cmd/config.go
Normal file
115
cmd/config.go
Normal file
|
|
@ -0,0 +1,115 @@
|
||||||
|
package cmd
|
||||||
|
|
||||||
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"git.towk2.me/towk/makeshift/pkg/util"
|
||||||
|
"github.com/rs/zerolog/log"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
const CONFIG_FILE = `---
|
||||||
|
#
|
||||||
|
# Makeshift Config
|
||||||
|
#
|
||||||
|
# Repository: https://git.towk2.me/towk/makeshift
|
||||||
|
#
|
||||||
|
# Default configuration file for 'makeshift' CLI and service.
|
||||||
|
# This file was autogenerated using 'makeshift config new' command.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set the service host.
|
||||||
|
host: http://localhost:5050
|
||||||
|
|
||||||
|
# Set the path to the file or directory to download.
|
||||||
|
path: help.txt
|
||||||
|
|
||||||
|
# Set the log file path. Logs will be written to this location.
|
||||||
|
log-file: logs/makeshift.log
|
||||||
|
|
||||||
|
# Set the log level. Possible values include 'debug', 'info', 'warn',
|
||||||
|
# 'error', 'disabled', and 'trace'.
|
||||||
|
log-level: info
|
||||||
|
|
||||||
|
# Set the plugins to use when downloading files and/or directories.
|
||||||
|
plugins:
|
||||||
|
- smd
|
||||||
|
- jinja2
|
||||||
|
|
||||||
|
# Set the positional arguments to pass to ALL plugins when downloading
|
||||||
|
# files and directories. NOTE: These arguments may be ignored or not
|
||||||
|
# used within certain plugins.
|
||||||
|
plugin-args:
|
||||||
|
|
||||||
|
# Set the key-word arguments stored in the data that is passed to ALL
|
||||||
|
# plugins when downloading files and directories. NOTE: These arguments
|
||||||
|
# may be ignored or not used within certain plugins.
|
||||||
|
plugin-kwargs:
|
||||||
|
|
||||||
|
# Set the profiles to use when downloading files and/or directories.
|
||||||
|
profiles:
|
||||||
|
- default
|
||||||
|
|
||||||
|
# Set whether to extract the archive when downloading directories.
|
||||||
|
extract: false
|
||||||
|
|
||||||
|
# Set whether to remove an archive after downloading and extracting.
|
||||||
|
# This requires that the 'extract' flag be set to 'true'.
|
||||||
|
remove-archive: false
|
||||||
|
|
||||||
|
# Set the path to a CA certificate.
|
||||||
|
cacert: ""
|
||||||
|
|
||||||
|
# Set the path to a CA key file.
|
||||||
|
keyfile: ""
|
||||||
|
`
|
||||||
|
|
||||||
|
var configCmd = &cobra.Command{
|
||||||
|
Use: "config",
|
||||||
|
Short: "Manage makeshift config file",
|
||||||
|
}
|
||||||
|
|
||||||
|
var configNewCmd = &cobra.Command{
|
||||||
|
Use: "new [path]",
|
||||||
|
Example: `
|
||||||
|
# create a new default config at specified path
|
||||||
|
makeshift config new configs/makeshift.yaml
|
||||||
|
`,
|
||||||
|
Args: cobra.ExactArgs(1),
|
||||||
|
Short: "Create a new config file",
|
||||||
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
|
for _, path := range args {
|
||||||
|
var (
|
||||||
|
overwrite, _ = cmd.Flags().GetBool("overwrite")
|
||||||
|
|
||||||
|
exists bool
|
||||||
|
err error
|
||||||
|
)
|
||||||
|
if exists, err = util.PathExists(path); err != nil {
|
||||||
|
log.Error().
|
||||||
|
Err(err).
|
||||||
|
Str("path", path).
|
||||||
|
Msg("failed to determine if path exists")
|
||||||
|
} else {
|
||||||
|
if exists && !overwrite {
|
||||||
|
log.Error().Msg("file exists and '--overwrite' flag not passed")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err := os.WriteFile(path, []byte(CONFIG_FILE), 0o644)
|
||||||
|
if err != nil {
|
||||||
|
log.Error().
|
||||||
|
Err(err).
|
||||||
|
Str("path", path).
|
||||||
|
Msg("failed to write diefault config file to path")
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
configNewCmd.Flags().BoolP("overwrite", "f", false, "Set whether to overwrite an existing file")
|
||||||
|
configCmd.AddCommand(configNewCmd)
|
||||||
|
rootCmd.AddCommand(configCmd)
|
||||||
|
}
|
||||||
|
|
@ -49,6 +49,7 @@ var downloadCmd = cobra.Command{
|
||||||
host, _ = cmd.Flags().GetString("host")
|
host, _ = cmd.Flags().GetString("host")
|
||||||
path, _ = cmd.Flags().GetString("path")
|
path, _ = cmd.Flags().GetString("path")
|
||||||
outputPath, _ = cmd.Flags().GetString("output")
|
outputPath, _ = cmd.Flags().GetString("output")
|
||||||
|
configPath, _ = cmd.Flags().GetString("config")
|
||||||
cacertPath, _ = cmd.Flags().GetString("cacert")
|
cacertPath, _ = cmd.Flags().GetString("cacert")
|
||||||
pluginNames, _ = cmd.Flags().GetStringSlice("plugins")
|
pluginNames, _ = cmd.Flags().GetStringSlice("plugins")
|
||||||
profileIDs, _ = cmd.Flags().GetStringSlice("profiles")
|
profileIDs, _ = cmd.Flags().GetStringSlice("profiles")
|
||||||
|
|
@ -62,6 +63,7 @@ var downloadCmd = cobra.Command{
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// build download query URL
|
||||||
query = fmt.Sprintf("/download/%s?", path)
|
query = fmt.Sprintf("/download/%s?", path)
|
||||||
if len(pluginNames) > 0 {
|
if len(pluginNames) > 0 {
|
||||||
query += "plugins=" + url.QueryEscape(strings.Join(pluginNames, ","))
|
query += "plugins=" + url.QueryEscape(strings.Join(pluginNames, ","))
|
||||||
|
|
@ -79,6 +81,7 @@ var downloadCmd = cobra.Command{
|
||||||
log.Debug().
|
log.Debug().
|
||||||
Str("host", host).
|
Str("host", host).
|
||||||
Str("path", path).
|
Str("path", path).
|
||||||
|
Str("config", configPath).
|
||||||
Str("query", query).
|
Str("query", query).
|
||||||
Str("output", outputPath).
|
Str("output", outputPath).
|
||||||
Strs("profiles", profileIDs).
|
Strs("profiles", profileIDs).
|
||||||
|
|
|
||||||
141
cmd/root.go
141
cmd/root.go
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
logger "git.towk2.me/towk/makeshift/pkg/log"
|
logger "git.towk2.me/towk/makeshift/pkg/log"
|
||||||
|
|
@ -20,14 +21,14 @@ var (
|
||||||
var rootCmd = cobra.Command{
|
var rootCmd = cobra.Command{
|
||||||
Use: "makeshift",
|
Use: "makeshift",
|
||||||
Short: "Extensible file cobbler",
|
Short: "Extensible file cobbler",
|
||||||
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
||||||
var (
|
var (
|
||||||
logFile string
|
logFile, _ = cmd.Flags().GetString("log-file")
|
||||||
err error
|
configPath, _ = cmd.Flags().GetString("config")
|
||||||
|
err error
|
||||||
)
|
)
|
||||||
|
|
||||||
// initialize the logger
|
// initialize the logger
|
||||||
logFile, _ = cmd.Flags().GetString("log-file")
|
|
||||||
err = logger.InitWithLogLevel(loglevel, logFile)
|
err = logger.InitWithLogLevel(loglevel, logFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msg("failed to initialize logger")
|
log.Error().Err(err).Msg("failed to initialize logger")
|
||||||
|
|
@ -35,12 +36,13 @@ var rootCmd = cobra.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
// You can bind cobra and viper in a few locations, but PersistencePreRunE on the root command works well
|
// You can bind cobra and viper in a few locations, but PersistencePreRunE on the root command works well
|
||||||
err = initializeConfig(cmd)
|
return initConfig(cmd, configPath)
|
||||||
},
|
},
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
// try and set flags using env vars
|
// try and set flags using env vars
|
||||||
setenv(cmd, "log-file", "MAKESHIFT_LOG_FILE")
|
setenv(cmd, "log-file", "MAKESHIFT_LOG_FILE")
|
||||||
setenv(cmd, "log-level", "MAKESHIFT_LOG_LEVEL")
|
setenv(cmd, "log-level", "MAKESHIFT_LOG_LEVEL")
|
||||||
|
setenv(cmd, "config", "MAKESHIFT_CONFIG_FILE")
|
||||||
if len(args) == 0 {
|
if len(args) == 0 {
|
||||||
err := cmd.Help()
|
err := cmd.Help()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -54,6 +56,7 @@ var rootCmd = cobra.Command{
|
||||||
err := logger.LogFile.Close()
|
err := logger.LogFile.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msg("failed to close log file")
|
log.Error().Err(err).Msg("failed to close log file")
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -71,8 +74,83 @@ func init() {
|
||||||
initLogger,
|
initLogger,
|
||||||
)
|
)
|
||||||
// initialize the config a single time
|
// initialize the config a single time
|
||||||
rootCmd.PersistentFlags().VarP(&loglevel, "log-level", "l", "Set the log level output")
|
rootCmd.PersistentFlags().VarP(&loglevel, "log-level", "l", "Set the log level output (can be set with MAKESHIFT_LOG_LEVEL)")
|
||||||
rootCmd.PersistentFlags().String("log-file", "", "Set the log file path (can be set with MAKESHIFT_LOG_FILE)")
|
rootCmd.PersistentFlags().String("log-file", "", "Set the log file path (can be set with MAKESHIFT_LOG_FILE)")
|
||||||
|
rootCmd.PersistentFlags().StringP("config", "c", "", "Set the config file path (can be set with MAKESHIFT_CONFIG_FILE)")
|
||||||
|
}
|
||||||
|
|
||||||
|
func initLogger() {
|
||||||
|
// initialize the logger
|
||||||
|
logfile, _ := rootCmd.PersistentFlags().GetString("log-file")
|
||||||
|
err := logger.InitWithLogLevel(loglevel, logfile)
|
||||||
|
if err != nil {
|
||||||
|
log.Error().Err(err).Msg("failed to initialize logger")
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func initConfig(cmd *cobra.Command, path string) error {
|
||||||
|
|
||||||
|
// Dissect the path to separate config name from its directory
|
||||||
|
var (
|
||||||
|
isFlagSet = cmd.Flags().Changed("config")
|
||||||
|
filename = filepath.Base(path)
|
||||||
|
ext = filepath.Ext(filename)
|
||||||
|
directory = filepath.Dir(path)
|
||||||
|
v = viper.New()
|
||||||
|
)
|
||||||
|
|
||||||
|
// The 'config' flag not set, so don't continue
|
||||||
|
if !isFlagSet {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only use specified YAML file from --config or -c flag
|
||||||
|
v.SetConfigName(strings.TrimSuffix(filename, ext))
|
||||||
|
v.SetConfigType("yaml")
|
||||||
|
v.AddConfigPath(directory)
|
||||||
|
|
||||||
|
// Attempt to read the config file. Return an error if we cannot parse
|
||||||
|
// the config file or if it is not found.
|
||||||
|
if err := v.ReadInConfig(); err != nil {
|
||||||
|
if isFlagSet {
|
||||||
|
// It's okay if there isn't a config file when no path is provided
|
||||||
|
// if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
switch err.(type) {
|
||||||
|
case viper.ConfigFileNotFoundError:
|
||||||
|
log.Error().
|
||||||
|
Err(err).
|
||||||
|
Str("path", path).
|
||||||
|
Msg("failed to read config")
|
||||||
|
os.Exit(1)
|
||||||
|
default:
|
||||||
|
log.Error().Err(err).Msg("failed to read config")
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// When we bind flags to environment variables expect that the
|
||||||
|
// environment variables are prefixed, e.g. a flag like --number
|
||||||
|
// binds to an environment variable STING_NUMBER. This helps
|
||||||
|
// avoid conflicts.
|
||||||
|
v.SetEnvPrefix("MAKESHIFT")
|
||||||
|
|
||||||
|
// Environment variables can't have dashes in them, so bind them to their equivalent
|
||||||
|
// keys with underscores, e.g. --favorite-color to STING_FAVORITE_COLOR
|
||||||
|
v.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
|
||||||
|
|
||||||
|
// Bind to environment variables
|
||||||
|
// Works great for simple config names, but needs help for names
|
||||||
|
// like --favorite-color which we fix in the bindFlags function
|
||||||
|
v.AutomaticEnv()
|
||||||
|
|
||||||
|
// Bind the current command's flags to viper
|
||||||
|
bindFlags(cmd, v)
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func setenv(cmd *cobra.Command, varname string, envvar string) {
|
func setenv(cmd *cobra.Command, varname string, envvar string) {
|
||||||
|
|
@ -95,16 +173,6 @@ func setenvp(cmd *cobra.Command, varname string, envvar string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func initLogger() {
|
|
||||||
// initialize the logger
|
|
||||||
logfile, _ := rootCmd.PersistentFlags().GetString("log-file")
|
|
||||||
err := logger.InitWithLogLevel(loglevel, logfile)
|
|
||||||
if err != nil {
|
|
||||||
log.Error().Err(err).Msg("failed to initialize logger")
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func handleResponseError(res *http.Response, host, query string, err error) {
|
func handleResponseError(res *http.Response, host, query string, err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).
|
log.Error().Err(err).
|
||||||
|
|
@ -147,44 +215,3 @@ func bindFlags(cmd *cobra.Command, v *viper.Viper) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func initializeConfig(cmd *cobra.Command) error {
|
|
||||||
v := viper.New()
|
|
||||||
|
|
||||||
// Set the base name of the config file, without the file extension.
|
|
||||||
v.SetConfigName("makeshift")
|
|
||||||
|
|
||||||
// Set as many paths as you like where viper should look for the
|
|
||||||
// config file. We are only looking in the current working directory.
|
|
||||||
v.AddConfigPath(".")
|
|
||||||
|
|
||||||
// Attempt to read the config file, gracefully ignoring errors
|
|
||||||
// caused by a config file not being found. Return an error
|
|
||||||
// if we cannot parse the config file.
|
|
||||||
if err := v.ReadInConfig(); err != nil {
|
|
||||||
// It's okay if there isn't a config file
|
|
||||||
if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// When we bind flags to environment variables expect that the
|
|
||||||
// environment variables are prefixed, e.g. a flag like --number
|
|
||||||
// binds to an environment variable STING_NUMBER. This helps
|
|
||||||
// avoid conflicts.
|
|
||||||
v.SetEnvPrefix("MAKESHIFT")
|
|
||||||
|
|
||||||
// Environment variables can't have dashes in them, so bind them to their equivalent
|
|
||||||
// keys with underscores, e.g. --favorite-color to STING_FAVORITE_COLOR
|
|
||||||
v.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
|
|
||||||
|
|
||||||
// Bind to environment variables
|
|
||||||
// Works great for simple config names, but needs help for names
|
|
||||||
// like --favorite-color which we fix in the bindFlags function
|
|
||||||
v.AutomaticEnv()
|
|
||||||
|
|
||||||
// Bind the current command's flags to viper
|
|
||||||
bindFlags(cmd, v)
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
|
||||||
16
cmd/serve.go
16
cmd/serve.go
|
|
@ -19,17 +19,18 @@ var serveCmd = &cobra.Command{
|
||||||
makeshift serve --root ./test --init -l debug
|
makeshift serve --root ./test --init -l debug
|
||||||
`,
|
`,
|
||||||
Args: cobra.NoArgs,
|
Args: cobra.NoArgs,
|
||||||
PreRun: func(cmd *cobra.Command, args []string) {
|
// PreRun: func(cmd *cobra.Command, args []string) {
|
||||||
setenv(cmd, "host", "MAKESHIFT_HOST")
|
// setenv(cmd, "host", "MAKESHIFT_HOST")
|
||||||
setenv(cmd, "root", "MAKESHIFT_ROOT")
|
// setenv(cmd, "root", "MAKESHIFT_ROOT")
|
||||||
setenv(cmd, "timeout", "MAKESHIFT_TIMEOUT")
|
// setenv(cmd, "timeout", "MAKESHIFT_TIMEOUT")
|
||||||
setenv(cmd, "cacert", "MAKESHIFT_CACERT")
|
// setenv(cmd, "cacert", "MAKESHIFT_CACERT")
|
||||||
setenv(cmd, "keyfile", "MAKESHIFT_KEYFILE")
|
// setenv(cmd, "keyfile", "MAKESHIFT_KEYFILE")
|
||||||
},
|
// },
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
var (
|
var (
|
||||||
host, _ = cmd.Flags().GetString("host")
|
host, _ = cmd.Flags().GetString("host")
|
||||||
rootPath, _ = cmd.Flags().GetString("root")
|
rootPath, _ = cmd.Flags().GetString("root")
|
||||||
|
configPath, _ = cmd.Flags().GetString("config")
|
||||||
cacertPath, _ = cmd.Flags().GetString("cacert")
|
cacertPath, _ = cmd.Flags().GetString("cacert")
|
||||||
keyfile, _ = cmd.Flags().GetString("keyfile")
|
keyfile, _ = cmd.Flags().GetString("keyfile")
|
||||||
timeout, _ = cmd.Flags().GetInt("timeout")
|
timeout, _ = cmd.Flags().GetInt("timeout")
|
||||||
|
|
@ -60,6 +61,7 @@ var serveCmd = &cobra.Command{
|
||||||
Str("host", parsed.Host).
|
Str("host", parsed.Host).
|
||||||
Any("paths", map[string]string{
|
Any("paths", map[string]string{
|
||||||
"root": rootPath,
|
"root": rootPath,
|
||||||
|
"config": configPath,
|
||||||
"cacert": cacertPath,
|
"cacert": cacertPath,
|
||||||
"keyfile": keyfile,
|
"keyfile": keyfile,
|
||||||
"data": server.PathForData(),
|
"data": server.PathForData(),
|
||||||
|
|
|
||||||
15
docker-compose.yaml
Normal file
15
docker-compose.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
services:
|
||||||
|
makeshift:
|
||||||
|
# build: ./Dockerfile
|
||||||
|
image: makeshift:latest
|
||||||
|
container_name: makeshift
|
||||||
|
network:
|
||||||
|
- internal
|
||||||
|
volumes:
|
||||||
|
- /tmp/makeshift/makeshift:/usr/local/bin
|
||||||
|
- /tmp/makeshift/plugins/*:/makeshift/server/plugins
|
||||||
|
ports:
|
||||||
|
- 5050:5050
|
||||||
|
|
||||||
|
networks:
|
||||||
|
internal:
|
||||||
54
examples/config.yaml
Normal file
54
examples/config.yaml
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
---
|
||||||
|
#
|
||||||
|
# Makeshift Config
|
||||||
|
#
|
||||||
|
# Repository: https://git.towk2.me/towk/makeshift
|
||||||
|
#
|
||||||
|
# Default configuration file for 'makeshift' CLI and service.
|
||||||
|
# This file was autogenerated using 'makeshift config new' command.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set the service host.
|
||||||
|
host: http://localhost:5050
|
||||||
|
|
||||||
|
# Set the path to the file or directory to download.
|
||||||
|
path: help.txt
|
||||||
|
|
||||||
|
# Set the log file path. Logs will be written to this location.
|
||||||
|
log-file: logs/makeshift.log
|
||||||
|
|
||||||
|
# Set the log level. Possible values include 'debug', 'info', 'warn',
|
||||||
|
# 'error', 'disabled', and 'trace'.
|
||||||
|
log-level: info
|
||||||
|
|
||||||
|
# Set the plugins to use when downloading files and/or directories.
|
||||||
|
plugins:
|
||||||
|
- smd
|
||||||
|
- jinja2
|
||||||
|
|
||||||
|
# Set the positional arguments to pass to ALL plugins when downloading
|
||||||
|
# files and directories. NOTE: These arguments may be ignored or not
|
||||||
|
# used within certain plugins.
|
||||||
|
plugin-args:
|
||||||
|
|
||||||
|
# Set the key-word arguments stored in the data that is passed to ALL
|
||||||
|
# plugins when downloading files and directories. NOTE: These arguments
|
||||||
|
# may be ignored or not used within certain plugins.
|
||||||
|
plugin-kwargs:
|
||||||
|
|
||||||
|
# Set the profiles to use when downloading files and/or directories.
|
||||||
|
profiles:
|
||||||
|
- default
|
||||||
|
|
||||||
|
# Set whether to extract the archive when downloading directories.
|
||||||
|
extract: false
|
||||||
|
|
||||||
|
# Set whether to remove an archive after downloading and extracting.
|
||||||
|
# This requires that the 'extract' flag be set to 'true'.
|
||||||
|
remove-archive: false
|
||||||
|
|
||||||
|
# Set the path to a CA certificate.
|
||||||
|
cacert: ""
|
||||||
|
|
||||||
|
# Set the path to a CA key file.
|
||||||
|
keyfile: ""
|
||||||
1
makeshift.wiki
Submodule
1
makeshift.wiki
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 64090892b46ffea8d1775cc37b995182aeacf31d
|
||||||
Loading…
Add table
Add a link
Reference in a new issue