From b788a8bbfda5395ad7a42f5607c7d9a68ea3e837 Mon Sep 17 00:00:00 2001 From: ahkui <14049597+ahkui@users.noreply.github.com> Date: Tue, 21 Aug 2018 13:49:56 +0800 Subject: [PATCH] Add Web Based IDEs (#1705) Add Web Based IDEs: Theia, WebIDE, Codaid, IceCoder. --- docker-compose.yml | 56 +++++++++++++++++++++++++++++++++++++++++ env-example | 6 +++++ ide-codiad/Dockerfile | 5 ++++ ide-codiad/config.php | 43 +++++++++++++++++++++++++++++++ ide-icecoder/Dockerfile | 21 ++++++++++++++++ ide-theia/Dockerfile | 5 ++++ ide-webide/Dockerfile | 3 +++ 7 files changed, 139 insertions(+) create mode 100644 ide-codiad/Dockerfile create mode 100644 ide-codiad/config.php create mode 100644 ide-icecoder/Dockerfile create mode 100644 ide-theia/Dockerfile create mode 100644 ide-webide/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index dd595843..9541eb49 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -891,3 +891,59 @@ services: networks: - backend +### IDE-THEIA ################################################ + ide-theia: + build: + context: ./ide-theia + volumes: + - ${APP_CODE_PATH_HOST}:/home/project + ports: + - "${IDE_THEIA_PORT}:3000" + networks: + - backend + +### IDE-WEBIDE ################################################ + ide-webide: + build: + context: ./ide-webide + volumes: + - ${DATA_PATH_HOST}/ide/webide/ide.db:/root/.coding-ide/ide.db + ports: + - "${IDE_WEBIDE_PORT}:8080" + networks: + - backend + +### IDE-CODIAD ################################################ + ide-codiad: + build: + context: ./ide-codiad + environment: + - APP_CODE_PATH_CONTAINER=${APP_CODE_PATH_CONTAINER} + - TZ=${WORKSPACE_TIMEZONE} + - PGID=1000 + - PUID=1000 + volumes: + - /etc/localtime:/etc/localtime:ro + - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER} + - ${DATA_PATH_HOST}/ide/codiad:/config + ports: + - "${IDE_CODIAD_PORT}:80" + networks: + - backend + +### IDE-ICECODER ################################################ + ide-icecoder: + build: + context: ./ide-icecoder + environment: + - DOCUMENT_ROOT=${APP_CODE_PATH_CONTAINER} + - TZ=${WORKSPACE_TIMEZONE} + - PGID=1000 + - PUID=1000 + volumes: + - /etc/localtime:/etc/localtime:ro + - ${APP_CODE_PATH_HOST}:/home/laradock/ICEcoder/dev + ports: + - "${IDE_ICECODER_PORT}:8080" + networks: + - backend diff --git a/env-example b/env-example index bad6e1d1..0b727829 100644 --- a/env-example +++ b/env-example @@ -411,3 +411,9 @@ MONGO_WEBUI_INSTALL_MONGO=false METABASE_PORT=3030 METABASE_DB_FILE=metabase.db METABASE_JAVA_TIMEZONE=US/Pacific + +### IDE ############################################### +IDE_THEIA_PORT=987 +IDE_WEBIDE_PORT=984 +IDE_CODIAD_PORT=985 +IDE_ICECODER_PORT=986 diff --git a/ide-codiad/Dockerfile b/ide-codiad/Dockerfile new file mode 100644 index 00000000..583e75dc --- /dev/null +++ b/ide-codiad/Dockerfile @@ -0,0 +1,5 @@ +FROM linuxserver/codiad + +LABEL maintainer="ahkui " + +COPY config.php /defaults/config.php diff --git a/ide-codiad/config.php b/ide-codiad/config.php new file mode 100644 index 00000000..acd43941 --- /dev/null +++ b/ide-codiad/config.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/ide-icecoder/Dockerfile b/ide-icecoder/Dockerfile new file mode 100644 index 00000000..a58ec677 --- /dev/null +++ b/ide-icecoder/Dockerfile @@ -0,0 +1,21 @@ +FROM php:alpine + +LABEL maintainer="ahkui " + +ARG PUID=1000 +ENV PUID ${PUID} +ARG PGID=1000 +ENV PGID ${PGID} + +RUN apk add --no-cache git + +RUN addgroup -g $PGID -S laradock && \ + adduser -u $PUID -S laradock -G laradock + +USER laradock + +RUN cd /home/laradock && git clone https://github.com/mattpass/ICEcoder.git + +WORKDIR /home/laradock/ICEcoder + +CMD ["php","-S","0.0.0.0:8080"] diff --git a/ide-theia/Dockerfile b/ide-theia/Dockerfile new file mode 100644 index 00000000..39f2c1b6 --- /dev/null +++ b/ide-theia/Dockerfile @@ -0,0 +1,5 @@ +FROM theiaide/theia + +LABEL maintainer="ahkui " + +RUN echo 'fs.inotify.max_user_watches=524288' >> /etc/sysctl.conf \ No newline at end of file diff --git a/ide-webide/Dockerfile b/ide-webide/Dockerfile new file mode 100644 index 00000000..257b50a7 --- /dev/null +++ b/ide-webide/Dockerfile @@ -0,0 +1,3 @@ +FROM webide/webide + +LABEL maintainer="ahkui "