From addd7d2c4e6b19a2f6ac084ff8378d9baa8b6112 Mon Sep 17 00:00:00 2001 From: sysadmin Date: Tue, 4 Feb 2025 15:51:47 +0000 Subject: [PATCH] Add docker-compose.yml --- docker-compose.yml | 72 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4c2095a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,72 @@ +--- +##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: + - 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 # Expose the service on port 8443 + 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 \ No newline at end of file