Import a linkding docker config.
This commit is contained in:
parent
e2857f8672
commit
0cf2db138d
|
@ -38,6 +38,13 @@
|
|||
"db_path": "/data/docker/forgejo/postgres",
|
||||
},
|
||||
},
|
||||
"linkding": {
|
||||
"enable": "true",
|
||||
"provider": "docker",
|
||||
"volumes": [
|
||||
"/data/docker/linkding:/etc/linkding/data",
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
|
|
6
main.go
6
main.go
|
@ -97,7 +97,7 @@ func main() {
|
|||
config.Services[name] = s
|
||||
|
||||
|
||||
// Scripted action
|
||||
// Scripted actions for the service
|
||||
|
||||
// Add service packages to the global list
|
||||
pkgs := &config.System.Packages
|
||||
|
@ -107,15 +107,15 @@ func main() {
|
|||
if s.Proxy != "" {
|
||||
port, err := s.GetHostPort()
|
||||
if err != nil {
|
||||
fmt.Println("Error in service", name)
|
||||
fmt.Println(err.Error())
|
||||
fmt.Println("Error in service", name)
|
||||
return
|
||||
}
|
||||
|
||||
err = AddProxy(s.Proxy, port)
|
||||
if err != nil {
|
||||
fmt.Println("Error adding proxy for service", name)
|
||||
fmt.Println(err.Error())
|
||||
fmt.Println("Error adding proxy for service", name)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
12
services/linkding/docker.json
Normal file
12
services/linkding/docker.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
# docker-compose -f <linkding.yaml> exec linkding python manage.py createsuperuser --username=joe --email=joe@example.com
|
||||
|
||||
ports: ["9090:9090"],
|
||||
|
||||
provider: "docker",
|
||||
packages: [],
|
||||
src: "sissbruecker/linkding:latest",
|
||||
configFiles: [
|
||||
"linkding.template:/services/docker/linkding.json",
|
||||
]
|
||||
}
|
70
services/linkding/linkding.template
Normal file
70
services/linkding/linkding.template
Normal file
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
"services": {
|
||||
"linkding": {
|
||||
"container_name": "linkding",
|
||||
"image": "{{.Src}}",
|
||||
"ports": [
|
||||
{{range .Ports}}
|
||||
"{{.}}",
|
||||
{{end}}
|
||||
],
|
||||
"volumes": [
|
||||
{{range .Volumes}}
|
||||
"{{.}}",
|
||||
{{end}}
|
||||
],
|
||||
"environment": [
|
||||
## Docker container name
|
||||
#LD_CONTAINER_NAME=linkding
|
||||
## Port on the host system that the application should be published on
|
||||
#LD_HOST_PORT=9090
|
||||
## Directory on the host system that should be mounted as data dir into the Docker container
|
||||
#LD_HOST_DATA_DIR=./data
|
||||
|
||||
# Can be used to run linkding under a context path, for example: linkding/
|
||||
# Must end with a slash `/`
|
||||
LD_CONTEXT_PATH=,
|
||||
# Username of the initial superuser to create, leave empty to not create one
|
||||
LD_SUPERUSER_NAME=,
|
||||
# Password for the initial superuser, leave empty to disable credentials authentication and rely on proxy authentication instead
|
||||
LD_SUPERUSER_PASSWORD=,
|
||||
# Option to disable background tasks
|
||||
LD_DISABLE_BACKGROUND_TASKS=False,
|
||||
# Option to disable URL validation for bookmarks completely
|
||||
LD_DISABLE_URL_VALIDATION=False,
|
||||
# Enables support for authentication proxies such as Authelia
|
||||
LD_ENABLE_AUTH_PROXY=False,
|
||||
# Name of the request header that the auth proxy passes to the application to identify the user
|
||||
# See docs/Options.md for more details
|
||||
LD_AUTH_PROXY_USERNAME_HEADER=,
|
||||
# The URL that linkding should redirect to after a logout, when using an auth proxy
|
||||
# See docs/Options.md for more details
|
||||
LD_AUTH_PROXY_LOGOUT_URL=,
|
||||
# List of trusted origins from which to accept POST requests
|
||||
# See docs/Options.md for more details
|
||||
LD_CSRF_TRUSTED_ORIGINS=,
|
||||
|
||||
# Database settings
|
||||
# These are currently only required for configuring PostreSQL.
|
||||
# By default, linkding uses SQLite for which you don't need to configure anything.
|
||||
|
||||
# Database engine, can be sqlite (default) or postgres
|
||||
LD_DB_ENGINE=,
|
||||
# Database name (default: linkding)
|
||||
LD_DB_DATABASE=,
|
||||
# Username to connect to the database server (default: linkding)
|
||||
LD_DB_USER=,
|
||||
# Password to connect to the database server
|
||||
LD_DB_PASSWORD=,
|
||||
# The hostname where the database is hosted (default: localhost)
|
||||
LD_DB_HOST=,
|
||||
# Port use to connect to the database server
|
||||
# Should use the default port if not set
|
||||
LD_DB_PORT=,
|
||||
# Any additional options to pass to the database (default: {})
|
||||
LD_DB_OPTIONS=,
|
||||
],
|
||||
{{with .Config.Restart}}"restart": "{{.}}",{{end}}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue