From dbbe0c065318e32c5de499eee50de34b03c1eff0 Mon Sep 17 00:00:00 2001 From: zro Date: Mon, 8 Jun 2026 10:30:51 +0300 Subject: [PATCH] Init --- .env.template | 2 ++ README.md | 1 + docker-compose.yml | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .env.template create mode 100644 README.md create mode 100644 docker-compose.yml diff --git a/.env.template b/.env.template new file mode 100644 index 0000000..1fe128c --- /dev/null +++ b/.env.template @@ -0,0 +1,2 @@ +PASSWORD="MyVSCodePassword" +SUDO_PASSWORD="MyVSCodeStrongPassword" diff --git a/README.md b/README.md new file mode 100644 index 0000000..b8579da --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# VSCode \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2955bf9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,53 @@ +services: + vscode: + image: lscr.io/linuxserver/code-server:latest + container_name: vscode + environment: + - VIRTUAL_HOST=vsc.domain.ru + - VIRTUAL_PORT=8443 + - LETSENCRYPT_HOST=vsc.domain.ru + - LETSENCRYPT_EMAIL=my@email.ru + - TZ=Europe/Moscow + - PASSWORD=${PASSWORD} + - SUDO_PASSWORD=${SUDO_PASSWORD} + - PUID=1100 + - PGID=1100 + expose: + - 8443 +# ports: +# - "4080:8080" +# - "4443:8443" + restart: unless-stopped + volumes: + - /opt:/opt:rw + - /mnt:/mnt:rw + - vscode_config:/config + - vscode_workspace:/workspace + networks: + - "net" + deploy: + resources: + limits: + memory: 1G # жёсткий лимит RAM + cpus: '1.0' # максимум 1 ядро CPU + reservations: + memory: 512M # гарантированный минимум RAM + cpus: '0.5' # минимум 0.5 ядра CPU + +volumes: + vscode_config: + driver: local + driver_opts: + type: none + device: /mnt/vscode/config + o: bind + vscode_workspace: + driver: local + driver_opts: + type: none + device: /mnt/vscode/workspace + o: bind + +networks: + net: + external: true