Commit 0935d18d authored by Patrik Meijer's avatar Patrik Meijer
Browse files

Add up to date comments and instructions in Dockerfile.with-front-end

parent 4af61185
Loading
Loading
Loading
Loading
+16 −12
Changes for Dockerfile.with-front-end: 16 added lines, 12 removed lines.
Original line number Diff line number Diff line
# !! Note - This is WIP and currently not working !!
# docker build -t caid-tools .
# docker run --rm --name caid -p 3000:3000 -p 8888:8888 -p 5150:5150 caid-tools
# docker build -f Dockerfile.with-front-end -t caid-with-front-end .
# docker run --rm --name caid -p 4000:4000 caid-tools

# This in a multiple stage build and only the built go-resources will be used from this step.
# TODO: When everything else is working - duplicate the vsix portion from Dockerfile.front-end
FROM golang:1.22.3-bookworm
RUN apt update
RUN apt install -y protobuf-compiler
@@ -32,10 +33,11 @@ COPY --from=0 /depi /depi
USER root

# supervisor
RUN apt update -y && apt install supervisor wget gnupg -y
RUN apt update -y && apt install git supervisor wget gnupg nodejs -y

# gitea listening on port 3000
# ENV GITEA__REPOSITORY__ENABLE_PUSH_CREATE_USER=true
# TODO: Install gitea!

# mongodb and mongorestore
RUN wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | apt-key add -
RUN echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/debian bullseye/mongodb-org/6.0 main" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list
@@ -50,31 +52,33 @@ COPY ./webgme-depi/webgme-depi-components /webgme-depi
RUN npm --prefix /webgme-depi install

# python
RUN apt-get update && apt-get install -y git python3 python3-pip python3-dev default-libmysqlclient-dev build-essential pkg-config
RUN apt-get update && apt-get install -y python3 python3-pip python3-dev default-libmysqlclient-dev build-essential pkg-config

# depi-monitors
COPY ./depi-impl/depi/monitors /depi/monitors
COPY ./depi-impl/depi/proto /depi/monitors/proto

WORKDIR /depi/monitors
# TODO: FIX ME!!
# TODO: FIX ME!
# RUN pip install .
WORKDIR /

# supervisor
COPY examples/mono-image/supervisord.conf /etc/supervisor/supervisord.conf
COPY examples/mono-image/supervisord_w_frontend.conf /etc/supervisor/supervisord.conf

## init data that can be moved in correct place before services are running
# TODO: gitea might need a slightly different config (and/or location) here dependening on how it's installed.
# COPY examples/mono-image/app.ini /data/gitea/conf/app.ini
RUN mkdir -p /depi/go-impl/.state/main
COPY examples/depi/memory-state-dump/main/1 /depi/go-impl/.state/main/1

# init data inserted after services are running via script
RUN mkdir -p /var/lib/depi-init-data/webgme
COPY examples/webgme/dumps /var/lib/depi-init-data/webgme/dumps
COPY examples/repos /var/lib/depi-init-data/repos
COPY examples/mono-image/init.sh /var/lib/depi-init-data/init.sh
COPY examples/push-git-repos.sh /var/lib/depi-init-data/push-git-repos.sh
RUN mkdir -p /depi-init-data/webgme
COPY examples/webgme/dumps /depi-init-data/webgme/dumps
COPY examples/repos /depi-init-data/repos
COPY examples/mono-image/init.sh /depi-init-data/init.sh
COPY examples/mono-image/ensure_port.sh /depi-init-data/ensure_port.sh
COPY examples/push-git-repos.sh /depi-init-data/push-git-repos.sh

# RUN /var/lib/depi-init-data/init.sh
RUN apt install -y netcat
+68 −0
Changes for examples/mono-image/supervisord_w_frontend.conf: 68 added lines, 0 removed lines.
Original line number Diff line number Diff line
[supervisord]
nodaemon=true
user=root

[program:theia]
directory=/home/theia/applications/browser
command=node /home/theia/applications/browser/lib/backend/main.js /home/project --hostname=0.0.0.0 --port=4000
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stdout
stderr_logfile_maxbytes=0

# TODO: Add back once gitea installed
# [program:gitea]
# directory=/
# command=/usr/bin/entrypoint
# stdout_logfile=/dev/stdout
# stdout_logfile_maxbytes=0
# stderr_logfile=/dev/stdout
# stderr_logfile_maxbytes=0

[program:mongodb]
directory=/
command=mongod
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stdout
stderr_logfile_maxbytes=0

[program:webgme-server]
directory=/webgme-depi
command=npm run start-with-mongo
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stdout
stderr_logfile_maxbytes=0

[program:webgme-monitor]
directory=/webgme-depi
command=npm run monitor
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stdout
stderr_logfile_maxbytes=0
examples/mono-image/supervisord.conf
[program:depi-server]
directory=/depi/go-impl
command=/depi/go-impl/depiserver -config depi_config.json
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stdout
stderr_logfile_maxbytes=0

[program:git-monitor]
directory=/depi/monitors
command=python -u ./src/depi_monitors/git_monitor.py --depi 127.0.0.1:5150 --user mark --password mark --toolid git --port 3003
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stdout
stderr_logfile_maxbytes=0

[program:gsn-monitor]
directory=/depi/monitors
command=python -u ./src/depi_monitors/git_monitor.py --depi 127.0.0.1:5150 --user mark --password mark --toolid git-gsn --port 3002
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stdout
stderr_logfile_maxbytes=0
 No newline at end of file