another refactor :D

This commit is contained in:
Ben
2021-03-04 04:04:37 -05:00
parent 6db02c709c
commit ade3cefa33
7 changed files with 28 additions and 32 deletions

View File

@@ -21,6 +21,5 @@ jobs:
with:
push: true
tags: bencdr/code-server-deploy-container:latest
file: deploy-container/Dockerfile
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

View File

@@ -1,10 +1,30 @@
# Start with our deploy-container image (Debian)
FROM bencdr/deploy-container:latest
# Start from the code-server Debian base image
FROM codercom/code-server:latest
USER coder
# Apply VS Code settings
COPY deploy-container/settings.json .local/share/code-server/User/settings.json
# Use bash shell
ENV SHELL=/bin/bash
# Install unzip + rclone (support for remote filesystem)
RUN sudo apt-get update && sudo apt-get install unzip -y
RUN curl https://rclone.org/install.sh | sudo bash
# You can add custom software and dependencies for your environment here. Some examples:
# RUN code-server --install-extension esbenp.prettier-vscode
# RUN sudo apt-get install -y build-essential
# RUN COPY myTool /home/coder/myTool
# Fix permissions for code-server
RUN sudo chown -R coder:coder /home/coder/.local
# Port
ENV PORT=8080
# Use our custom entrypoint script first
COPY deploy-container/entrypoint.sh /usr/bin/deploy-container-entrypoint.sh
ENTRYPOINT ["/usr/bin/deploy-container-entrypoint.sh"]

View File

@@ -19,7 +19,7 @@ A collection of one-click buttons and scripts for deploying code-server to vario
- You need to save "snapshots" to use your latest images
- Storage is always persistent, and you can usually add extra volumes
- VMs can support many workloads, such as running Docker or Kubernetes clusters
- [👀 Preview the VM install script](vm-script/)
- [👀 Docs for the VM install script](vm-script/)
- App Platforms deploy code-server containers, and are often rebuilt
- App platforms can shut down when you are not using it, saving you money
- All software and dependencies need to be defined in the `Dockerfile` or install script so they aren't destroyed on a rebuild

View File

@@ -1,24 +0,0 @@
# Start from the code-server Debian base image
FROM codercom/code-server:latest
USER coder
# Apply VS Code settings
COPY settings.json .local/share/code-server/User/settings.json
# Use bash shell
ENV SHELL=/bin/bash
# Install unzip + rclone (support for remote filesystem)
RUN sudo apt-get update && sudo apt-get install unzip -y
RUN curl https://rclone.org/install.sh | sudo bash
# Fix permissions for code-server
RUN sudo chown -R coder:coder /home/coder/.local
# Port
ENV PORT=8080
# Use our custom entrypoint script first
COPY deploy-container-entrypoint.sh /usr/bin/deploy-container-entrypoint.sh
ENTRYPOINT ["/usr/bin/deploy-container-entrypoint.sh"]

View File

@@ -6,11 +6,11 @@ An image built for deploying code-server to [railway.app](https://railway.app),
To launch your code-server environment, click the button below and log in with GitHub:
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new?template=https%3A%2F%2Fgithub.com%2Fbpmct%2Fcode-server-railway&envs=PASSWORD%2CGIT_REPO&PASSWORDDesc=Your+password+to+log+in+to+code-server+with&GIT_REPODesc=A+git+repo+to+clone+and+open+in+code-server+%28ex.+https%3A%2F%2Fgithub.com%2Fcdr%2Fdocs.git%29)
| [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new?template=https%3A%2F%2Fgithub.com%2Fbpmct%2Fcode-server-railway&envs=PASSWORD%2CGIT_REPO&PASSWORDDesc=Your+password+to+log+in+to+code-server+with&GIT_REPODesc=A+git+repo+to+clone+and+open+in+code-server+%28ex.+https%3A%2F%2Fgithub.com%2Fcdr%2Fdocs.git%29) | [![Deploy on Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/bpmct/deploy-code-server/tree/main) |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| For Railway, it will ask you to make a new repo to store this image, so you can add additional software to your repo's `Dockerfile` in the future. | For Heroku, we recommend [using this repo as a template](https://github.com/bpmct/code-server-railway/generate) and using the one-click deploy on your own repo to further modify your app. |
For Railway, it will ask you to make a new repo to store this image, so you can add additional software to your repo's `Dockerfile` in the future.
For Heroku, we recommend [using this repo as a template](https://github.com/bpmct/code-server-railway/generate) and using the one-click deploy on your own repo to further modify your app.
---
## 💾 Persist your filesystem with `rclone`

1
vm-script/README.md Normal file
View File

@@ -0,0 +1 @@
yep it is coming