homepage-code-server/docker-compose.yml

72 lines
3.2 KiB
YAML

---
##networks:
# Place networks here if you need them
#network info here: its just a habit for me to put this at the top for a quick glance at free ports
#Ports in use:
# 3000:3000 - homepage
# 8443:8443 - code-server
##volumes:
#Place volumes here if needed
##env:
### if you want to use a .env file, you can place the variable name here to help remind you
# PUID=${PUID}
# PGID=${PGID}
# UMASK=${UMSK}
# TZ=${TZ}
# DOCKER ROOT=#{DROOT}
# DOCKER SOCK=#{DSOCK}
# DOCKER APPS=#{DAPPS}
# CS_PWD=${CS_PWD} - code-server basic password auth. You'd be well advised to read THEIR docs on password/hashed password
##services:
services:
##homepage
homepage:
image: ghcr.io/gethomepage/homepage:latest
container_name: homepage
environment:
- PUID=${PUID} # optional, your user id
- PGID=${PGID} # optional, your group id
ports: # - if you use nginx proxy manager or others you can comment this out and proxy host to the internal name of the service and its internal port.
- 3000:3000
volumes:
- ${DAPPS}/homepage:/config # Make sure your local config directory exists, map this in code-server as well, don't forget what you map it too ie: homepage - see below in code-server service.
- ${DSOCK}:/var/run/docker.sock:ro # optional, for docker integrations
- ${DAPPS}/homepage/config/images:/app/public/images
# Volume mapping for custom images and image folder. Map this in code-server as well.
- ${DAPPS}/homepage/config/icons:/app/public/icons
# Volume mapping for custom icons and icon folder. Map this in code-server as well.
restart: unless-stopped
##code-server
code-server:
image: lscr.io/linuxserver/code-server:latest
container_name: code-server
environment:
- PUID=${PUID} # Replace with your user ID
- PGID=${PGID} # Replace with your group ID
- TZ=${TZ} # Set your timezone
- PASSWORD=${CS_PWD} # Optional, set your password for access
ports:
- 8443:8443 # - if you use nginx proxy manager or others you can comment this out and proxy host to the internal name of the service and its internal port.
volumes:
- ${DAPPS}/code-server/config:/config # Local directory for code-server config
- ${DAPPS}/homepage:/homepage #This is where you mapped the homepage/config earlier so that code-server
#can easily access it by its name. In code-server; File > Open Folder >
#Up one directory > homepage(or whatever you named it.
#- HASHED_PASSWORD= #optional
#- SUDO_PASSWORD=password #optional
#- SUDO_PASSWORD_HASH= #optional
#- PROXY_DOMAIN=cs.my.domain #optional
- ${DROOT}:/dock # Might as well add the "docker" directory or docker root. In code-server; File > Open Folder > ^a directory > dock.
# Docker root for easy edit of docker-compose.yaml .env etc. etc.
restart: no #probably best to not let this run all the time, spin it up when you need to make edits that are
#going to take more time than a quick "nano/vi" edit would normally take
#!!!!!!!!!!!!!!!!!!!! don't forget to stop the code-server container when finished editing