Created
November 16, 2019 21:27
-
-
Save caguiclajmg/bb23a1d3dd0a8eef1df3a810572e7128 to your computer and use it in GitHub Desktop.
Set up code-server with Nginx reverse Proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CFG_TZ=<timezone> | |
CFG_URL=<mydomain.com> | |
CFG_SUBDOMAINS=<subdomains>, | |
CFG_EMAIL=<email> | |
CFG_PASSWORD=<password> | |
CFG_DHLEVEL=2048 | |
CFG_ONLYSUBDOMAINS=true | |
docker run --name=letsencrypt --network code-server --cap-add=NET_ADMIN -d -e PUID=1000 -e PGID=1000 -e TZ=$CFG_TZ -e URL=$CFG_URL -e SUBDOMAINS=$CFG_SUBDOMAINS -e VALIDATION=http -e EMAIL=$CFG_EMAIL -e DHLEVEL=$CFG_DHLEVEL -e ONLY_SUBDOMAINS=$CFG_ONLYSUBDOMAINS -p 443:443 -p 80:80 --mount type=volume,source=letsencrypt,destination=/config --restart unless-stopped linuxserver/letsencrypt | |
docker run --name=code-server --network code-server -d -p 8080:8080 -e PASSWORD=$CFG_PASSWORD --mount type=volume,source=code-server,destination=/home/coder codercom/code-server:v2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment