Commit 7891afa5 authored by Mike Greiling's avatar Mike Greiling

Merge branch '276066-fix-webpack-configuration-for-gitpod-gdk' into 'master'

Fix webpack configuration for Gitpod GDK

See merge request gitlab-org/gitlab!47199
parents efb2baf3 b721b068
...@@ -15,9 +15,6 @@ tasks: ...@@ -15,9 +15,6 @@ tasks:
cd /workspace/gitlab-development-kit cd /workspace/gitlab-development-kit
[[ ! -L /workspace/gitlab-development-kit/gitlab ]] && ln -fs /workspace/gitlab /workspace/gitlab-development-kit/gitlab [[ ! -L /workspace/gitlab-development-kit/gitlab ]] && ln -fs /workspace/gitlab /workspace/gitlab-development-kit/gitlab
mv /workspace/gitlab-development-kit/secrets.yml /workspace/gitlab-development-kit/gitlab/config mv /workspace/gitlab-development-kit/secrets.yml /workspace/gitlab-development-kit/gitlab/config
# make webpack static, prevents that GitLab tries to connect to localhost webpack from browser outside the workspace
echo "webpack:" >> gdk.yml
echo " static: true" >> gdk.yml
# reconfigure GDK # reconfigure GDK
echo "$(date) – Reconfiguring GDK" | tee -a /workspace/startup.log echo "$(date) – Reconfiguring GDK" | tee -a /workspace/startup.log
gdk reconfigure gdk reconfigure
...@@ -43,6 +40,7 @@ tasks: ...@@ -43,6 +40,7 @@ tasks:
fi fi
# start GDK # start GDK
echo "$(date) – Starting GDK" | tee -a /workspace/startup.log echo "$(date) – Starting GDK" | tee -a /workspace/startup.log
export DEV_SERVER_PUBLIC_ADDR=$(gp url 3808)
export RAILS_HOSTS=$(gp url 3000 | sed -e 's+^http[s]*://++') export RAILS_HOSTS=$(gp url 3000 | sed -e 's+^http[s]*://++')
gdk start gdk start
# Run DB migrations # Run DB migrations
......
...@@ -18,6 +18,7 @@ const IS_DEV_SERVER = process.env.WEBPACK_DEV_SERVER === 'true'; ...@@ -18,6 +18,7 @@ const IS_DEV_SERVER = process.env.WEBPACK_DEV_SERVER === 'true';
const IS_EE = require('./helpers/is_ee_env'); const IS_EE = require('./helpers/is_ee_env');
const DEV_SERVER_HOST = process.env.DEV_SERVER_HOST || 'localhost'; const DEV_SERVER_HOST = process.env.DEV_SERVER_HOST || 'localhost';
const DEV_SERVER_PORT = parseInt(process.env.DEV_SERVER_PORT, 10) || 3808; const DEV_SERVER_PORT = parseInt(process.env.DEV_SERVER_PORT, 10) || 3808;
const DEV_SERVER_PUBLIC_ADDR = process.env.DEV_SERVER_PUBLIC_ADDR;
const DEV_SERVER_HTTPS = process.env.DEV_SERVER_HTTPS && process.env.DEV_SERVER_HTTPS !== 'false'; const DEV_SERVER_HTTPS = process.env.DEV_SERVER_HTTPS && process.env.DEV_SERVER_HTTPS !== 'false';
const DEV_SERVER_LIVERELOAD = IS_DEV_SERVER && process.env.DEV_SERVER_LIVERELOAD !== 'false'; const DEV_SERVER_LIVERELOAD = IS_DEV_SERVER && process.env.DEV_SERVER_LIVERELOAD !== 'false';
const WEBPACK_REPORT = process.env.WEBPACK_REPORT && process.env.WEBPACK_REPORT !== 'false'; const WEBPACK_REPORT = process.env.WEBPACK_REPORT && process.env.WEBPACK_REPORT !== 'false';
...@@ -554,6 +555,7 @@ module.exports = { ...@@ -554,6 +555,7 @@ module.exports = {
devServer: { devServer: {
host: DEV_SERVER_HOST, host: DEV_SERVER_HOST,
port: DEV_SERVER_PORT, port: DEV_SERVER_PORT,
public: DEV_SERVER_PUBLIC_ADDR,
https: DEV_SERVER_HTTPS, https: DEV_SERVER_HTTPS,
headers: { headers: {
'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Origin': '*',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment