File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ RUN sudo chown -R coder:coder /home/coder/.local
14
14
# Port for railway
15
15
ENV export PORT=80
16
16
17
+ # Install rclone (support for remote filesystem)
18
+ RUN apt-get install rclone -y
19
+
17
20
# Use our custom entrypoint script first
18
21
COPY railway-entrypoint.sh /usr/bin/railway-entrypoint.sh
19
22
ENTRYPOINT ["/usr/bin/railway-entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -6,5 +6,16 @@ START_DIR=${1:-/home/coder/project}
6
6
# Clone the git repo, if it exists
7
7
[ -z " ${GIT_REPO} " ] && echo " No GIT_REPO specified" ; git clone $GIT_REPO $START_DIR
8
8
9
+ # add rclone config and start rclone, if supplied
10
+ if [[ -z " ${RCLONE_CONFIG} " ]]; then
11
+ echo " RCLONE_CONFIG is not specified. Files will not persist"
12
+ else
13
+ echo " Copying rclone config..."
14
+ echo $RCLONE_CONFIG | base64 -d > .rclone.conf
15
+
16
+ # serve remote files on the first item in the rclone config
17
+ rclone serve sftp code-server-files:/home/coder/ --no-auth --vfs-cache-mode full&
18
+ fi
19
+
9
20
# Now we can run code-server with the default entrypoint
10
21
/usr/bin/entrypoint.sh --bind-addr 0.0.0.0:8080 $START_DIR
You can’t perform that action at this time.
0 commit comments