mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Merge branch 'new/14.0/dev_ide' into '14.0-test'
new/14.0/dev_ide into 14.0-test See merge request hibou-io/hibou-odoo/suite!937
This commit is contained in:
@@ -1 +1,3 @@
|
|||||||
.git
|
.git
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
|||||||
30
Dockerfile
30
Dockerfile
@@ -1,5 +1,30 @@
|
|||||||
FROM hibou/hibou-odoo:14.0
|
FROM hibou/hibou-odoo:14.0
|
||||||
|
|
||||||
|
USER 0
|
||||||
|
WORKDIR /opt/theia
|
||||||
|
COPY dev.package.json ./package.json
|
||||||
|
RUN set -x; \
|
||||||
|
curl -sL https://deb.nodesource.com/setup_12.x | bash - \
|
||||||
|
&& apt-get install -y \
|
||||||
|
nodejs \
|
||||||
|
build-essential \
|
||||||
|
libsecret-1-0 \
|
||||||
|
procps \
|
||||||
|
&& npm install --global yarn
|
||||||
|
RUN yarn --pure-lockfile && \
|
||||||
|
NODE_OPTIONS="--max_old_space_size=4096" yarn theia build && \
|
||||||
|
yarn theia download:plugins && \
|
||||||
|
yarn --production && \
|
||||||
|
yarn autoclean --init && \
|
||||||
|
echo *.ts >> .yarnclean && \
|
||||||
|
echo *.ts.map >> .yarnclean && \
|
||||||
|
echo *.spec.* >> .yarnclean && \
|
||||||
|
yarn autoclean --force && \
|
||||||
|
yarn cache clean && \
|
||||||
|
chown -R 104:33 /opt/theia \
|
||||||
|
;
|
||||||
|
|
||||||
|
USER 104
|
||||||
COPY --from=hibou/flow /flow /flow
|
COPY --from=hibou/flow /flow /flow
|
||||||
COPY --chown=104 entrypoint.sh /entrypoint.sh
|
COPY --chown=104 entrypoint.sh /entrypoint.sh
|
||||||
COPY --chown=104 . /opt/odoo/hibou-suite
|
COPY --chown=104 . /opt/odoo/hibou-suite
|
||||||
@@ -7,3 +32,8 @@ RUN rm /etc/odoo/odoo.conf \
|
|||||||
&& cp /opt/odoo/hibou-suite/debian/odoo.conf /etc/odoo/odoo.conf \
|
&& cp /opt/odoo/hibou-suite/debian/odoo.conf /etc/odoo/odoo.conf \
|
||||||
;
|
;
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
ENV SHELL=/bin/bash \
|
||||||
|
THEIA_DEFAULT_PLUGINS=local-dir:/opt/theia/plugins
|
||||||
|
ENV USE_LOCAL_GIT true
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,30 @@
|
|||||||
FROM registry.gitlab.com/hibou-io/hibou-odoo/odoo:RELEASE
|
FROM registry.gitlab.com/hibou-io/hibou-odoo/odoo:RELEASE
|
||||||
|
|
||||||
|
USER 0
|
||||||
|
WORKDIR /opt/theia
|
||||||
|
COPY dev.package.json ./package.json
|
||||||
|
RUN set -x; \
|
||||||
|
curl -sL https://deb.nodesource.com/setup_12.x | bash - \
|
||||||
|
&& apt-get install -y \
|
||||||
|
nodejs \
|
||||||
|
build-essential \
|
||||||
|
libsecret-1-0 \
|
||||||
|
procps \
|
||||||
|
&& npm install --global yarn
|
||||||
|
RUN yarn --pure-lockfile && \
|
||||||
|
NODE_OPTIONS="--max_old_space_size=4096" yarn theia build && \
|
||||||
|
yarn theia download:plugins && \
|
||||||
|
yarn --production && \
|
||||||
|
yarn autoclean --init && \
|
||||||
|
echo *.ts >> .yarnclean && \
|
||||||
|
echo *.ts.map >> .yarnclean && \
|
||||||
|
echo *.spec.* >> .yarnclean && \
|
||||||
|
yarn autoclean --force && \
|
||||||
|
yarn cache clean && \
|
||||||
|
chown -R 104:33 /opt/theia \
|
||||||
|
;
|
||||||
|
|
||||||
|
USER 104
|
||||||
COPY --from=registry.gitlab.com/hibou-io/hibou-odoo/flow /flow /flow
|
COPY --from=registry.gitlab.com/hibou-io/hibou-odoo/flow /flow /flow
|
||||||
COPY --chown=104 entrypoint.sh /entrypoint.sh
|
COPY --chown=104 entrypoint.sh /entrypoint.sh
|
||||||
COPY --chown=104 . /opt/odoo/hibou-suite
|
COPY --chown=104 . /opt/odoo/hibou-suite
|
||||||
@@ -7,3 +32,8 @@ RUN rm /etc/odoo/odoo.conf \
|
|||||||
&& cp /opt/odoo/hibou-suite/debian/odoo.conf /etc/odoo/odoo.conf \
|
&& cp /opt/odoo/hibou-suite/debian/odoo.conf /etc/odoo/odoo.conf \
|
||||||
;
|
;
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
ENV SHELL=/bin/bash \
|
||||||
|
THEIA_DEFAULT_PLUGINS=local-dir:/opt/theia/plugins
|
||||||
|
ENV USE_LOCAL_GIT true
|
||||||
|
|
||||||
|
|||||||
105
dev.package.json
Normal file
105
dev.package.json
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
{
|
||||||
|
"private": true,
|
||||||
|
"theia": {
|
||||||
|
"frontend": {
|
||||||
|
"config": {
|
||||||
|
"applicationName": "Theia Python Example",
|
||||||
|
"preferences": {
|
||||||
|
"files.enableTrash": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@theia/editor-preview": "latest",
|
||||||
|
"@theia/file-search": "latest",
|
||||||
|
"@theia/getting-started": "latest",
|
||||||
|
"@theia/git": "latest",
|
||||||
|
"@theia/markers": "latest",
|
||||||
|
"@theia/messages": "latest",
|
||||||
|
"@theia/monaco": "latest",
|
||||||
|
"@theia/navigator": "latest",
|
||||||
|
"@theia/outline-view": "latest",
|
||||||
|
"@theia/plugin-ext-vscode": "latest",
|
||||||
|
"@theia/preferences": "latest",
|
||||||
|
"@theia/preview": "latest",
|
||||||
|
"@theia/search-in-workspace": "latest",
|
||||||
|
"@theia/terminal": "latest",
|
||||||
|
"@theia/vsx-registry": "latest"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@theia/cli": "latest"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"preinstall": "node-gyp install"
|
||||||
|
},
|
||||||
|
"theiaPluginsDir": "plugins",
|
||||||
|
"theiaPlugins": {
|
||||||
|
"vscode-builtin-bat": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/bat-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-clojure": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/clojure-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-coffeescript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/coffeescript-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-configuration-editing": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/configuration-editing-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-cpp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/cpp-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-csharp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/csharp-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-css": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/css-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-debug-auto-launch": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/debug-auto-launch-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-docker": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/docker-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-emmet": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/emmet-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-fsharp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/fsharp-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-go": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/go-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-groovy": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/groovy-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-grunt": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/grunt-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-gulp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/gulp-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-handlebars": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/handlebars-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-hlsl": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/hlsl-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-html": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/html-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-html-language-features": "https://open-vsx.org/api/vscode/html-language-features/1.49.0/file/vscode.html-language-features-1.49.0.vsix",
|
||||||
|
"vscode-builtin-ini": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/ini-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-jake": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/jake-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-java": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/java-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-javascript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/javascript-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-json": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/json-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-json-language-features": "https://open-vsx.org/api/vscode/json-language-features/1.46.1/file/vscode.json-language-features-1.46.1.vsix",
|
||||||
|
"vscode-builtin-less": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/less-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-log": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/log-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-lua": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/lua-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-make": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/make-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-markdown": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/markdown-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-merge-conflicts": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/merge-conflict-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-npm": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/npm-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-node-debug": "https://github.com/theia-ide/vscode-node-debug/releases/download/v1.35.3/node-debug-1.35.3.vsix",
|
||||||
|
"vscode-builtin-node-debug2": "https://github.com/theia-ide/vscode-node-debug2/releases/download/v1.33.0/node-debug2-1.33.0.vsix",
|
||||||
|
"vscode-builtin-objective-c": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/objective-c-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-perl": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/perl-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-powershell": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/powershell-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-pug": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/pug-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-python": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/python-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-r": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/r-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-razor": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/razor-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-ruby": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/ruby-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-rust": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/rust-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-scss": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/scss-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-shaderlab": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/shaderlab-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-shellscript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/shellscript-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-sql": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/sql-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-swift": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/swift-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-theme-abyss": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-abyss-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-theme-defaults": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-defaults-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-theme-kimbie-dark": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-kimbie-dark-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-theme-monokai": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-monokai-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-theme-dimmed": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-monokai-dimmed-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-theme-quietlight": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-quietlight-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-theme-red": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-red-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-theme-solarized-dark": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-solarized-dark-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-theme-tomorrow-night-blue": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-tomorrow-night-blue-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-typescript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/typescript-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-typescript-language-features": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/typescript-language-features-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-vb": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/vb-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-icon-theme-seti": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/vscode-theme-seti-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-xml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/xml-1.39.1-prel.vsix",
|
||||||
|
"vscode-builtin-yaml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/yaml-1.39.1-prel.vsix",
|
||||||
|
"vscode-editorconfig": "https://github.com/theia-ide/editorconfig-vscode/releases/download/v0.14.4/EditorConfig-0.14.4.vsix",
|
||||||
|
"vscode-python": "https://github.com/microsoft/vscode-python/releases/download/2021.6.944021595/ms-python-release.vsix"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -2,6 +2,27 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# DEV_MODE=exclusive
|
||||||
|
# Will start the Theia IDE in the foreground, you can then start Odoo from a terminal.
|
||||||
|
# DEV_MODE=1
|
||||||
|
# Will start the Theia IDE in the background, regular Odoo commands will still work.
|
||||||
|
# Note that in Theia you can re-start Odoo e.g.
|
||||||
|
# `kill -s SIGHUP 1` to reload/restart Odoo
|
||||||
|
# `kill -s SIGQUIT 1` to cause Odoo to dump stacktrace in standard out
|
||||||
|
# Note that with Odoo running in the foreground, killing Odoo will kill the container.
|
||||||
|
# DEV_MODE=
|
||||||
|
# Unset to not use Theia at all.
|
||||||
|
|
||||||
|
# setup development IDE
|
||||||
|
if [ "$DEV_MODE" == "exclusive" ]
|
||||||
|
then
|
||||||
|
exec node /opt/theia/src-gen/backend/main.js /opt/odoo --hostname=0.0.0.0
|
||||||
|
elif [ "$DEV_MODE" != "" ]
|
||||||
|
then
|
||||||
|
node /opt/theia/src-gen/backend/main.js /opt/odoo --hostname=0.0.0.0 &
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# set the postgres database host, port, user and password according to the environment
|
# set the postgres database host, port, user and password according to the environment
|
||||||
# and pass them as arguments to the odoo process if not present in the config file
|
# and pass them as arguments to the odoo process if not present in the config file
|
||||||
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
|
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
|
||||||
|
|||||||
Reference in New Issue
Block a user