Save settings #3060
-
Hey, I was going to update to version 3.9.1 on railway, although I am not too familiar with docker. How can I preserve my vscode settings/extensions. Is there anyway to backup files? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I am using FROM codercom/code-server:3.9.2
USER coder
COPY deploy-container/config.yaml .config/code-server/config.yaml
COPY deploy-container/settings.json .local/share/code-server/User/settings.json
COPY deploy-container/tasks.json .local/share/code-server/User/tasks.json
COPY deploy-container/keybindings.json .local/share/code-server/User/keybindings.json
ENV SHELL=/bin/bash
RUN sudo apt-get update && sudo apt-get install unzip -y
RUN curl https://rclone.org/install.sh | sudo bash
RUN sudo curl -fsSL https://deb.nodesource.com/setup_15.x | sudo bash -
RUN sudo apt-get install -y nodejs
RUN sudo curl -L https://pnpm.js.org/pnpm.js | sudo node - add --global pnpm
RUN sudo apt-get install sqlite3
RUN git config --global user.name "$GIT_USER_NAME"
RUN git config --global user.email "$GIT_USER_EMAIL"
RUN pnpm config set store-dir /home/coder/.pnpm-store
RUN sudo mkdir -p /home/coder/.config/rclone
RUN sudo chown -R coder:coder /home/coder/.local
RUN sudo chown -R coder:coder /home/coder/.config/rclone
RUN code-server --install-extension actboy168.tasks --install-extension gruntfuggly.todo-tree --install-extension chrmarti.regex
RUN code-server --install-extension alefragnani.bookmarks --install-extension mkxml.vscode-filesize --install-extension jerrygoyal.shortcut-menu-bar
RUN code-server --install-extension chrisdias.vscode-opennewinstance --install-extension ritwickdey.LiveServer --install-extension alexcvzz.vscode-sqlite
RUN code-server --install-extension slevesque.vscode-hexdump --install-extension andyyaldoo.vscode-json --install-extension weijunyu.vscode-json-path
RUN code-server --install-extension nickdemayo.vscode-json-editor --install-extension github.vscode-pull-request-github --install-extension codezombiech.gitignore
RUN code-server --install-extension adam-bender.commit-message-editor --install-extension pkief.material-icon-theme
ENV PORT=8080
COPY deploy-container/entrypoint.sh /usr/bin/deploy-container-entrypoint.sh
ENTRYPOINT ["/usr/bin/deploy-container-entrypoint.sh"] You don't need to seperate them onto multiple lines, I only did that for readability. Finally to persist your files, you could back them up somewhere or just use rclone. |
Beta Was this translation helpful? Give feedback.
I am using
code-server
on railway too. Your vscode data can be found under/home/coder/.local/share/code-server/User/
. You can copy the settings and import them after updating. As for extensions, you can add commands to yourDockerfile
to install them automatically. Heres what mine looks like: