code-server:
image: codercom/code-server:4.22.0-ubuntu
expose:
- 8888
environment:
- PASSWORD=${CODE_SERVER_PASSWORD} # change password in env file
volumes:
- ./config:/config
- $PWD:/home/coder/workspace
ports:
- 8080:8888
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.codeserver.rule=Host(`subdomain.${DOMAIN_NAME}`)"
- "traefik.http.routers.codeserver.entrypoints=websecure"
- "traefik.http.routers.codeserver.tls.certresolver=letsencrypt"