Files
composes/code-server/compose.yml
T
tiennm99 a63c121075 feat(code-server): give the workspace its own volume
The workspace moves off the config volume onto code-server-workspace, so
wiping editor state and wiping code are separate acts.

The image only ever chowns the literal path /config/workspace, and reads
DEFAULT_WORKSPACE to pick the folder to open, so a named volume on /workspace
would come up root-owned and unwritable. Creating the directory in a local
Dockerfile seeds the volume with the right ownership instead.
2026-09-18 17:38:07 +07:00

28 lines
1.0 KiB
YAML

services:
code-server:
build: .
hostname: ${SERVICE_HOSTNAME}
environment:
- PUID=1000
- PGID=1000
- PASSWORD=${PASSWORD}
- SUDO_PASSWORD=${PASSWORD}
- 'DOCKER_MODS=linuxserver/mods:universal-package-install|linuxserver/mods:universal-docker|linuxserver/mods:code-server-golang|linuxserver/mods:code-server-nodejs|linuxserver/mods:code-server-npmglobal|linuxserver/mods:code-server-python3|linuxserver/mods:code-server-zsh'
- INSTALL_PACKAGES=gh|git|glab|unzip|zip
- NODEJS_MOD_VERSION=24
- TZ=Asia/Ho_Chi_Minh
- DEFAULT_WORKSPACE=/workspace
- GIT_AUTHOR_NAME=${GIT_NAME}
- GIT_AUTHOR_EMAIL=${GIT_EMAIL}
- GIT_COMMITTER_NAME=${GIT_NAME}
- GIT_COMMITTER_EMAIL=${GIT_EMAIL}
- HOST=${SERVICE_HOSTNAME}
- PWA_APPNAME=code-server
volumes:
- 'code-server-config:/config'
- 'code-server-workspace:/workspace'
- '/var/run/docker.sock:/var/run/docker.sock:ro'
volumes:
code-server-config:
code-server-workspace: