VS Code in the browser for lab editing.
Educational example only. Review every volume path, port, and credential before you run this. Do not copy production secrets into your wiki or git repo.
_shared/.env for non-secrets, _shared/.secret for credentialsmkdir -p /path/to/docker/stacks/code-server
cd /path/to/docker/stacks/code-server
# paste compose.yaml below, then:
docker compose pull
docker compose up -d
---
services:
code-server:
image: lscr.io/linuxserver/code-server:latest
container_name: code-server
hostname: code-server
env_file:
- /path/to/docker/stacks/_shared/.env
- /path/to/docker/stacks/_shared/.secret
logging:
driver: json-file
options:
max-file: ${DOCKERLOGGING_MAXFILE:-10} # Max number of log files
max-size: ${DOCKERLOGGING_MAXSIZE:-200k} # Max file size
volumes:
- /path/to/docker/data/code-server/config:/config
- /path/to/docker/data/code-server/:/code-server
- /path/to/docker:/path/to/docker/
- /path/to/ix-apps/app_configs/:/ix-apps
ports:
- 30012:8443
restart: unless-stopped
_shared/.secret.