瀏覽代碼

Add Web Based IDEs (#1705)

Add Web Based IDEs: Theia, WebIDE, Codaid, IceCoder.
ahkui 6 年之前
父節點
當前提交
b788a8bbfd
共有 7 個文件被更改,包括 139 次插入0 次删除
  1. 56 0
      docker-compose.yml
  2. 6 0
      env-example
  3. 5 0
      ide-codiad/Dockerfile
  4. 43 0
      ide-codiad/config.php
  5. 21 0
      ide-icecoder/Dockerfile
  6. 5 0
      ide-theia/Dockerfile
  7. 3 0
      ide-webide/Dockerfile

+ 56 - 0
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

+ 6 - 0
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

+ 5 - 0
ide-codiad/Dockerfile

@@ -0,0 +1,5 @@
+FROM linuxserver/codiad
+
+LABEL maintainer="ahkui <ahkui@outlook.com>"
+
+COPY config.php /defaults/config.php

+ 43 - 0
ide-codiad/config.php

@@ -0,0 +1,43 @@
+<?php
+/*
+*  Copyright (c) Codiad & Kent Safranski (codiad.com), distributed
+*  as-is and without warranty under the MIT License. See
+*  [root]/license.txt for more. This information must remain intact.
+*/
+//////////////////////////////////////////////////////////////////
+// CONFIG
+//////////////////////////////////////////////////////////////////
+// PATH TO CODIAD
+define("BASE_PATH", "/config/www/");
+// BASE URL TO CODIAD (without trailing slash)
+define("BASE_URL", "localhost");
+// THEME : default, modern or clear (look at /themes)
+define("THEME", "default");
+// ABSOLUTE PATH, this is used as whitelist for absolute path projects
+define("WHITEPATHS", BASE_PATH . ",/home,/");
+// SESSIONS (e.g. 7200)
+$cookie_lifetime = "0";
+// TIMEZONE
+date_default_timezone_set(getenv('TZ','UTC'));
+// Allows to overwrite the default language
+//define("LANGUAGE", "en");
+// External Authentification
+//define("AUTH_PATH", "/path/to/customauth.php");
+//////////////////////////////////////////////////////////////////
+// ** DO NOT EDIT CONFIG BELOW **
+//////////////////////////////////////////////////////////////////
+// PATHS
+define("COMPONENTS", BASE_PATH . "/components");
+define("PLUGINS", BASE_PATH . "/plugins");
+define("THEMES", BASE_PATH . "/themes");
+define("DATA", BASE_PATH . "/data");
+define("WORKSPACE", getenv('APP_CODE_PATH_CONTAINER',BASE_PATH . "workspace"));
+// URLS
+define("WSURL", getenv('APP_CODE_PATH_CONTAINER',BASE_PATH . "workspace"));
+// Marketplace
+define("MARKETURL", "http://market.codiad.com/json");
+// Update Check
+//define("UPDATEURL", "http://update.codiad.com/?v={VER}&o={OS}&p={PHP}&w={WEB}&a={ACT}");
+define("ARCHIVEURL", "https://github.com/Codiad/Codiad/archive/master.zip");
+define("COMMITURL", "https://api.github.com/repos/Codiad/Codiad/commits");
+?>

+ 21 - 0
ide-icecoder/Dockerfile

@@ -0,0 +1,21 @@
+FROM php:alpine
+
+LABEL maintainer="ahkui <ahkui@outlook.com>"
+
+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"]

+ 5 - 0
ide-theia/Dockerfile

@@ -0,0 +1,5 @@
+FROM theiaide/theia
+
+LABEL maintainer="ahkui <ahkui@outlook.com>"
+
+RUN echo 'fs.inotify.max_user_watches=524288' >> /etc/sysctl.conf

+ 3 - 0
ide-webide/Dockerfile

@@ -0,0 +1,3 @@
+FROM webide/webide
+
+LABEL maintainer="ahkui <ahkui@outlook.com>"