Skip to content

Commit

Permalink
Add code-server service
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusAhlfors committed Feb 22, 2024
1 parent bc56372 commit 5cddd80
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment && \
RUN ln -s /etc/diploi-git/gitconfig /etc/gitconfig
COPY diploi-credential-helper /usr/local/bin

# Install code server
curl -fsSL https://code-server.dev/install.sh | sh

# Init and run supervisor
COPY diploi-runonce.sh /usr/local/bin/diploi-runonce.sh
COPY supervisord.conf /etc/supervisord.conf
Expand Down
1 change: 1 addition & 0 deletions diploi-runonce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ node /app/lib/seedDatabase.js

# Now that everything is initialized, start all services
supervisorctl start www
supervisorctl start code-server

progress "Runonce done";

Expand Down
10 changes: 10 additions & 0 deletions supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,13 @@ stopasgroup=true
killasgroup=true
stdout_logfile=/var/log/status.log
stderr_logfile=/var/log/status.log

[program:code-server]
directory=/app
command=code-server --app-name Diploi --disable-telemetry --auth none --bind-addr 0.0.0.0:3001 /app
autostart=false
autorestart=true
stopasgroup=true
killasgroup=true
stdout_logfile=/var/log/code-server.log
stderr_logfile=/var/log/code-server.log

0 comments on commit 5cddd80

Please sign in to comment.