1 | PUID=1000 |
2 | PGID=1000 |
3 | UMASK=0022 |
4 | TZ=Etc/UTC |
5 | DROOT=/home/sysadmin/dock |
6 | DSOCK=/var/run/docker.sock |
7 | DAPPS=/home/sysadmin/dock/apps |
8 | CS_PWD=Password123! |
README.md
· 387 B · Markdown
Raw
Generic folder structure for docker:
/home/sysadmin/dock
/home/sysadmin/apps
In this case, you should create a homepage and a code-server folder in the apps/ folder:
/home/sysadmin/apps/homepage
/home/sysadmin/apps/code-server
Make sure they have have the right permissions:
sudo chown -R 1000:1000 /home/sysadmin/apps/homepage
sudo chown -R 1000:1000 /home/sysadminapps/code-server
Generic folder structure for docker:
/home/sysadmin/dock /home/sysadmin/apps
In this case, you should create a homepage and a code-server folder in the apps/ folder:
/home/sysadmin/apps/homepage /home/sysadmin/apps/code-server
Make sure they have have the right permissions:
sudo chown -R 1000:1000 /home/sysadmin/apps/homepage sudo chown -R 1000:1000 /home/sysadminapps/code-server
docker-compose.yml
· 3.0 KiB · YAML
Raw
---
##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
1 | --- |
2 | ##networks: |
3 | # Place networks here if you need them |
4 | |
5 | #network info here: its just a habit for me to put this at the top for a quick glance at free ports |
6 | |
7 | #Ports in use: |
8 | |
9 | # 3000:3000 - homepage |
10 | # 8443:8443 - code-server |
11 | |
12 | ##volumes: |
13 | #Place volumes here if needed |
14 | |
15 | ##env: |
16 | ### if you want to use a .env file, you can place the variable name here to help remind you |
17 | |
18 | # PUID=${PUID} |
19 | # PGID=${PGID} |
20 | # UMASK=${UMSK} |
21 | # TZ=${TZ} |
22 | # DOCKER ROOT=#{DROOT} |
23 | # DOCKER SOCK=#{DSOCK} |
24 | # DOCKER APPS=#{DAPPS} |
25 | # CS_PWD=${CS_PWD} - code-server basic password auth. You'd be well advised to read THEIR docs on password/hashed password |
26 | |
27 | ##services: |
28 | services: |
29 | ##homepage |
30 | homepage: |
31 | image: ghcr.io/gethomepage/homepage:latest |
32 | container_name: homepage |
33 | environment: |
34 | - PUID=${PUID} # optional, your user id |
35 | - PGID=${PGID} # optional, your group id |
36 | ports: |
37 | - 3000:3000 |
38 | volumes: |
39 | - ${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. |
40 | - ${DSOCK}:/var/run/docker.sock:ro # optional, for docker integrations |
41 | - ${DAPPS}/homepage/config/images:/app/public/images |
42 | # Volume mapping for custom images and image folder. Map this in code-server as well. |
43 | - ${DAPPS}/homepage/config/icons:/app/public/icons |
44 | # Volume mapping for custom icons and icon folder. Map this in code-server as well. |
45 | restart: unless-stopped |
46 | |
47 | ##code-server |
48 | |
49 | code-server: |
50 | image: lscr.io/linuxserver/code-server:latest |
51 | container_name: code-server |
52 | environment: |
53 | - PUID=${PUID} # Replace with your user ID |
54 | - PGID=${PGID} # Replace with your group ID |
55 | - TZ=${TZ} # Set your timezone |
56 | - PASSWORD=${CS_PWD} # Optional, set your password for access |
57 | ports: |
58 | - 8443:8443 # Expose the service on port 8443 |
59 | volumes: |
60 | - ${DAPPS}/code-server/config:/config # Local directory for code-server config |
61 | - ${DAPPS}/homepage:/homepage #This is where you mapped the homepage/config earlier so that code-server |
62 | #can easily access it by its name. In code-server; File > Open Folder > |
63 | #Up one directory > homepage(or whatever you named it. |
64 | #- HASHED_PASSWORD= #optional |
65 | #- SUDO_PASSWORD=password #optional |
66 | #- SUDO_PASSWORD_HASH= #optional |
67 | #- PROXY_DOMAIN=cs.my.domain #optional |
68 | - ${DROOT}:/dock # Might as well add the "docker" directory or docker root. In code-server; File > Open Folder > ^a directory > dock. |
69 | # Docker root for easy edit of docker-compose.yaml .env etc. etc. |
70 | restart: no #probably best to not let this run all the time, spin it up when you need to make edits that are |
71 | #going to take more time than a quick "nano/vi" edit would normally take |
72 | #!!!!!!!!!!!!!!!!!!!! don't forget to stop the code-server container when finished editing |