Skip to content

Commit b788a8b

Browse files
ahkuibestlong
authored andcommitted
Add Web Based IDEs (laradock#1705)
Add Web Based IDEs: Theia, WebIDE, Codaid, IceCoder.
1 parent 89051de commit b788a8b

7 files changed

Lines changed: 139 additions & 0 deletions

File tree

docker-compose.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,3 +891,59 @@ services:
891891
networks:
892892
- backend
893893

894+
### IDE-THEIA ################################################
895+
ide-theia:
896+
build:
897+
context: ./ide-theia
898+
volumes:
899+
- ${APP_CODE_PATH_HOST}:/home/project
900+
ports:
901+
- "${IDE_THEIA_PORT}:3000"
902+
networks:
903+
- backend
904+
905+
### IDE-WEBIDE ################################################
906+
ide-webide:
907+
build:
908+
context: ./ide-webide
909+
volumes:
910+
- ${DATA_PATH_HOST}/ide/webide/ide.db:/root/.coding-ide/ide.db
911+
ports:
912+
- "${IDE_WEBIDE_PORT}:8080"
913+
networks:
914+
- backend
915+
916+
### IDE-CODIAD ################################################
917+
ide-codiad:
918+
build:
919+
context: ./ide-codiad
920+
environment:
921+
- APP_CODE_PATH_CONTAINER=${APP_CODE_PATH_CONTAINER}
922+
- TZ=${WORKSPACE_TIMEZONE}
923+
- PGID=1000
924+
- PUID=1000
925+
volumes:
926+
- /etc/localtime:/etc/localtime:ro
927+
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
928+
- ${DATA_PATH_HOST}/ide/codiad:/config
929+
ports:
930+
- "${IDE_CODIAD_PORT}:80"
931+
networks:
932+
- backend
933+
934+
### IDE-ICECODER ################################################
935+
ide-icecoder:
936+
build:
937+
context: ./ide-icecoder
938+
environment:
939+
- DOCUMENT_ROOT=${APP_CODE_PATH_CONTAINER}
940+
- TZ=${WORKSPACE_TIMEZONE}
941+
- PGID=1000
942+
- PUID=1000
943+
volumes:
944+
- /etc/localtime:/etc/localtime:ro
945+
- ${APP_CODE_PATH_HOST}:/home/laradock/ICEcoder/dev
946+
ports:
947+
- "${IDE_ICECODER_PORT}:8080"
948+
networks:
949+
- backend

env-example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,3 +411,9 @@ MONGO_WEBUI_INSTALL_MONGO=false
411411
METABASE_PORT=3030
412412
METABASE_DB_FILE=metabase.db
413413
METABASE_JAVA_TIMEZONE=US/Pacific
414+
415+
### IDE ###############################################
416+
IDE_THEIA_PORT=987
417+
IDE_WEBIDE_PORT=984
418+
IDE_CODIAD_PORT=985
419+
IDE_ICECODER_PORT=986

ide-codiad/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM linuxserver/codiad
2+
3+
LABEL maintainer="ahkui <ahkui@outlook.com>"
4+
5+
COPY config.php /defaults/config.php

ide-codiad/config.php

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
/*
3+
* Copyright (c) Codiad & Kent Safranski (codiad.com), distributed
4+
* as-is and without warranty under the MIT License. See
5+
* [root]/license.txt for more. This information must remain intact.
6+
*/
7+
//////////////////////////////////////////////////////////////////
8+
// CONFIG
9+
//////////////////////////////////////////////////////////////////
10+
// PATH TO CODIAD
11+
define("BASE_PATH", "/config/www/");
12+
// BASE URL TO CODIAD (without trailing slash)
13+
define("BASE_URL", "localhost");
14+
// THEME : default, modern or clear (look at /themes)
15+
define("THEME", "default");
16+
// ABSOLUTE PATH, this is used as whitelist for absolute path projects
17+
define("WHITEPATHS", BASE_PATH . ",/home,/");
18+
// SESSIONS (e.g. 7200)
19+
$cookie_lifetime = "0";
20+
// TIMEZONE
21+
date_default_timezone_set(getenv('TZ','UTC'));
22+
// Allows to overwrite the default language
23+
//define("LANGUAGE", "en");
24+
// External Authentification
25+
//define("AUTH_PATH", "/path/to/customauth.php");
26+
//////////////////////////////////////////////////////////////////
27+
// ** DO NOT EDIT CONFIG BELOW **
28+
//////////////////////////////////////////////////////////////////
29+
// PATHS
30+
define("COMPONENTS", BASE_PATH . "/components");
31+
define("PLUGINS", BASE_PATH . "/plugins");
32+
define("THEMES", BASE_PATH . "/themes");
33+
define("DATA", BASE_PATH . "/data");
34+
define("WORKSPACE", getenv('APP_CODE_PATH_CONTAINER',BASE_PATH . "workspace"));
35+
// URLS
36+
define("WSURL", getenv('APP_CODE_PATH_CONTAINER',BASE_PATH . "workspace"));
37+
// Marketplace
38+
define("MARKETURL", "http://market.codiad.com/json");
39+
// Update Check
40+
//define("UPDATEURL", "http://update.codiad.com/?v={VER}&o={OS}&p={PHP}&w={WEB}&a={ACT}");
41+
define("ARCHIVEURL", "https://github.com/Codiad/Codiad/archive/master.zip");
42+
define("COMMITURL", "https://api.github.com/repos/Codiad/Codiad/commits");
43+
?>

ide-icecoder/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM php:alpine
2+
3+
LABEL maintainer="ahkui <ahkui@outlook.com>"
4+
5+
ARG PUID=1000
6+
ENV PUID ${PUID}
7+
ARG PGID=1000
8+
ENV PGID ${PGID}
9+
10+
RUN apk add --no-cache git
11+
12+
RUN addgroup -g $PGID -S laradock && \
13+
adduser -u $PUID -S laradock -G laradock
14+
15+
USER laradock
16+
17+
RUN cd /home/laradock && git clone https://github.com/mattpass/ICEcoder.git
18+
19+
WORKDIR /home/laradock/ICEcoder
20+
21+
CMD ["php","-S","0.0.0.0:8080"]

ide-theia/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM theiaide/theia
2+
3+
LABEL maintainer="ahkui <ahkui@outlook.com>"
4+
5+
RUN echo 'fs.inotify.max_user_watches=524288' >> /etc/sysctl.conf

ide-webide/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM webide/webide
2+
3+
LABEL maintainer="ahkui <ahkui@outlook.com>"

0 commit comments

Comments
 (0)