From aee30a0aaffad4a8ea3e4ef30b15d705044db544 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Mon, 6 May 2024 00:37:17 +0200 Subject: [PATCH] Add openssh service Signed-off-by: Bensuperpc --- Makefile | 2 +- caddy/bensuperpc.org/Caddyfile | 4 ++++ docker-compose.openssh.yml | 25 +++++++++++++++++++++++++ env/openssh.env | 11 +++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 docker-compose.openssh.yml create mode 100644 env/openssh.env diff --git a/Makefile b/Makefile index 33e7338..0df3a7f 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ DOCKER := docker -PROFILES := webserver wordpress adminer uptime-kuma portainer qbittorrent gitea jellyfin watchtower backup +PROFILES := webserver wordpress adminer uptime-kuma portainer qbittorrent gitea jellyfin watchtower backup openssh PROFILE_CMD := $(addprefix --profile ,$(PROFILES)) COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /') diff --git a/caddy/bensuperpc.org/Caddyfile b/caddy/bensuperpc.org/Caddyfile index 0134e9f..bca661b 100644 --- a/caddy/bensuperpc.org/Caddyfile +++ b/caddy/bensuperpc.org/Caddyfile @@ -56,6 +56,10 @@ jellyfin.bensuperpc.org { reverse_proxy jellyfin:8096 } +ssh.bensuperpc.org { + reverse_proxy openssh:2222 +} + link.bensuperpc.org { redir /rickroll https://www.youtube.com/watch?v=dQw4w9WgXcQ permanent redir /babyshark https://www.youtube.com/watch?v=XqZsoesa55w permanent diff --git a/docker-compose.openssh.yml b/docker-compose.openssh.yml new file mode 100644 index 0000000..ffbe758 --- /dev/null +++ b/docker-compose.openssh.yml @@ -0,0 +1,25 @@ +version: '3.9' + +services: + # Openssh + openssh: + image: linuxserver/openssh-server:latest + container_name: openssh + profiles: + - openssh + restart: on-failure + env_file: + - env/openssh.env + volumes: + - openssh_config:/config + - openssh_data:/data + networks: + - infra-network + security_opt: + - no-new-privileges:true + +volumes: + openssh_config: + name: openssh_config + openssh_data: + name: openssh_data diff --git a/env/openssh.env b/env/openssh.env new file mode 100644 index 0000000..798ebf8 --- /dev/null +++ b/env/openssh.env @@ -0,0 +1,11 @@ +PUID=1000 +PGID=1000 +PUBLIC_KEY= +# PUBLIC_KEY_FILE= +# PUBLIC_KEY_DIR= +# PUBLIC_KEY_URL= +SUDO_ACCESS=false +PASSWORD_ACCESS=false +# USER_PASSWORD= +# USER_PASSWORD_FILE= +# USER_NAME= \ No newline at end of file