mirror of
https://github.com/bytedream/docker4ssh.git
synced 2025-06-27 01:40:32 +02:00
Initial commit
This commit is contained in:
28
extra/database.sql
Normal file
28
extra/database.sql
Normal file
@ -0,0 +1,28 @@
|
||||
create table if not exists auth
|
||||
(
|
||||
container_id text not null,
|
||||
user text,
|
||||
password blob
|
||||
);
|
||||
|
||||
create unique index if not exists auth_container_id_uindex
|
||||
on auth (container_id);
|
||||
|
||||
create table if not exists settings
|
||||
(
|
||||
container_id text not null,
|
||||
network_mode enum default 3 not null,
|
||||
configurable bool default 0 not null,
|
||||
run_level enum default 1 not null,
|
||||
startup_information bool default 1 not null,
|
||||
exit_after text default '' not null,
|
||||
keep_on_exit bool default 0 not null,
|
||||
check (configurable IN (0, 1)),
|
||||
check (keep_on_exit IN (0, 1)),
|
||||
check (network_mode IN (1, 2, 3, 4, 5)),
|
||||
check (run_level IN (1, 2, 3)),
|
||||
check (startup_information IN (0, 1))
|
||||
);
|
||||
|
||||
create unique index if not exists settings_container_id_uindex
|
||||
on settings (container_id);
|
57
extra/docker4ssh.conf
Normal file
57
extra/docker4ssh.conf
Normal file
@ -0,0 +1,57 @@
|
||||
[profile]
|
||||
# the directory where profiles are stored
|
||||
Dir = "./profile/"
|
||||
|
||||
# defalt settings for profiles
|
||||
[profile.default]
|
||||
Password = ""
|
||||
NetworkMode = 3
|
||||
Configurable = true
|
||||
RunLevel = 1
|
||||
StartupInformation = true
|
||||
ExitAfter = ""
|
||||
KeepOnExit = false
|
||||
|
||||
# settings for dynamic container creation
|
||||
[profile.dynamic]
|
||||
Enable = true
|
||||
Password = ""
|
||||
NetworkMode = 3
|
||||
Configurable = true
|
||||
RunLevel = 1
|
||||
StartupInformation = true
|
||||
ExitAfter = ""
|
||||
KeepOnExit = false
|
||||
|
||||
[api]
|
||||
Port = 8420
|
||||
|
||||
[api.configure]
|
||||
Binary = "./configure"
|
||||
Man = "./man/configure.1"
|
||||
|
||||
[ssh]
|
||||
# the default ssh port. if blank, port 2222 will be used
|
||||
Port = 2222
|
||||
# path to the ssh private key. if blank, a random key will be generated
|
||||
Keyfile = "./docker4ssh.key"
|
||||
# password of the ssh private key
|
||||
Passphrase = ""
|
||||
|
||||
[database]
|
||||
# path to sqlite3 database file. there may be support for other databases in the future
|
||||
Sqlite3File = "./docker4ssh.sqlite3"
|
||||
|
||||
[network.default]
|
||||
Subnet = "172.69.0.0/16"
|
||||
|
||||
[network.isolate]
|
||||
Subnet = "172.96.0.0/16"
|
||||
|
||||
[logging]
|
||||
# the loglevel. available levels are: debug, info, warn, error, fatal
|
||||
Level = "info"
|
||||
ConsoleOutput = true
|
||||
ConsoleError = true
|
||||
OutputFile = "./docker4ssh.log"
|
||||
ErrorFile = "./docker4ssh.log"
|
33
extra/profile.conf
Normal file
33
extra/profile.conf
Normal file
@ -0,0 +1,33 @@
|
||||
#[chad]
|
||||
# REQUIRED - (ssh) username. can be specified via regex.
|
||||
# to use regex, put a 'regex:' in front of it
|
||||
# Username = "chad"
|
||||
|
||||
# OPTIONAL - (ssh) password. can be specified via regex or as hash.
|
||||
# to use regex, put a 'regex:' in front of it.
|
||||
# if you want to specify a hash, put a 'sha1:', 'sha256:' or 'sha512:' at the begging of it
|
||||
# Password = ""
|
||||
|
||||
# OPTIONAL - the network mode. must be one of the following: 1 (off) | 2 (isolate) | 3 (host) | 4 (docker) | 5 (none)
|
||||
# NetworkMode = 3
|
||||
|
||||
# OPTIONAL - if the container should be configurable
|
||||
# Configurable = true
|
||||
|
||||
# OPTIONAL - the container run behavior. must be one of the following: 1 (user) | 2 (container) 3 | (forever)
|
||||
# RunLevel = 1
|
||||
|
||||
# OPTIONAL - if information should be shown about the container on startup
|
||||
# StartupInformation = true
|
||||
|
||||
# OPTIONAL - a process name to exit after it has finished
|
||||
# ExitAfter = ""
|
||||
|
||||
# OPTIONAL - not delete the container when it stops working
|
||||
# KeepOnExit = false
|
||||
|
||||
# REQUIRED OR `Container` - the image to connect to
|
||||
# Image = "archlinux:latest"
|
||||
|
||||
# REQUIRED OR `Image` - the container id to connect to
|
||||
# Container = ""
|
Reference in New Issue
Block a user