-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Most stable server OS for running code-server in a vps? #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I believe we are recommending Ubuntu 16.04 at the moment or I believe our Docker config. |
I run pretty stable with this configuration: version: '3.7'
services:
nginx-proxy:
#image: jwilder/nginx-proxy:alpine replaced by extended Dockerfile
build: .
container_name: proxy
image: mkox/nginx-proxy
ports:
- "80:80" #http redirect
- "443:443" #https
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro # listening to docker events
- /etc/certs:/etc/nginx/certs # host place for ssl certs
environment:
DEFAULT_HOST: domain.tld
networks:
- outpost_network
codeserver:
image: codercom/code-server
container_name: code
volumes:
# for scaling (swarm/stack) instances can share same workspace
# depending on fs type/emu
- /opt/docker/codeserver/projects:/opt/projects
- /opt/docker/codeserver/data:/data
environment:
# nginx-proxy will autodetect
VIRTUAL_HOST: code.domain.tld
# code-server defaults to 8443
VIRTUAL_PORT: 8443
# start code-server
# https is handled by proxy so http is ok
# set a pw (!)
# ARG: desired project workspace
command: code-server --allow-http --password=code-server-rocks /opt/projects
# code-server --help
# ARGUMENTS
# WORKDIR [default: (directory to binary)] Specify working dir
# OPTIONS
# -d, --data-dir=data-dir
# -h, --host=host [default: 0.0.0.0]
# -o, --open Open in browser on startup
# -p, --port=port [default: 8443] Port to bind on
# -v, --version show CLI version
# --allow-http
# --cert=cert
# --cert-key=cert-key
# --help show CLI help
# --no-auth
# --password=password
networks:
outpost_network:
networks:
outpost_network:
driver: bridge
name: outpost_network My custom nginx-proxy Dockerfile FROM jwilder/nginx-proxy:alpine
LABEL maintainer="m-ko"
RUN apk add --no-cache nano logrotate
COPY ./nginxlog.conf /etc/logrotate.d/nginx
RUN { \
echo 'server_tokens off;'; \
echo 'client_max_body_size 200m;'; \
} > /etc/nginx/conf.d/override_proxy.conf
|
@ZK-G Here's what I recommend based on my stacks:
|
I tested on Azure with Ubuntu 18.04, and I got #121 error. If someone saw this comment wanna run this project on Azure, I do not think Ubuntu 18.04 is a good option. |
Hey Sneezry, try it again but make the folder "BACKUPS" in /root/.code-server and try again, Azure's Ubuntu will be no different from GCP's Ubuntu other than specific services that they run tailored to their hosting companies. |
Hi @haydennyyy , thanks for your advice. I did do that, but it doesn't work for me. It just tries to open workspace.json, and throws no such file error. |
@Sneezry that error is a minor bug and does not affect user experience. If the server fails to load, you forgot to install |
@sr229 still not work :-( |
@Sneezry it seems your instance is not on the local host, do you have any reverse proxies installed? If so, you need to configure your proxy to point it there. |
Otherwise, if this is on a cloud provider, check your firewall rules if the firewall allows incoming HTTP for all ports. |
And how to keep it working in background,
it have problem with screen #67 and I haven't try in others way yet.
Running in Debian without screen return the error #121 even if the server keep working.
In general I also notice a global slowdowns in loading files and folders.
The text was updated successfully, but these errors were encountered: