Commit 44ccea21 authored by supermikii's avatar supermikii
Browse files

remove .env & modify script to demo3

parent 80e5f0ac
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -4,13 +4,12 @@
SCRIPT=$(readlink -f "$0")
BASEDIR=$(dirname "$SCRIPT")


echo ""
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ">>> Building Demo Service Frontend"
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ""

$BASEDIR/src/client/build.sh
$BASEDIR/src/frontend/build.sh

DEMOBIN=$BASEDIR/bin/demo-server
@@ -24,6 +23,3 @@ $BASEDIR/src/backend/build.sh $DEMOBIN

echo ""
echo ">>> Demo Service build completed"


+0 −5
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ cp $BASEDIR/src/backend/Dockerfile $DEMOBIN
# cp $BASEDIR/src/backend/app_instance.yaml $DEMOBIN
cp $BASEDIR/entrypoint.sh $DEMOBIN


echo ">>> Dockerizing"
cd $DEMOBIN
docker build --no-cache --rm -t meep-docker-registry:30001/demo3 .
@@ -34,7 +33,3 @@ cd $BASEDIR

echo ""
echo ">>> Done"



+7 −0
Original line number Diff line number Diff line
#!/bin/sh
SCRIPT=$(readlink -f "$0")
BASEDIR=$(dirname "$SCRIPT")

# Make sure package-lock.json does not contain a bad version of 'warning' package
cd $BASEDIR
npm ci
+5 −22
Original line number Diff line number Diff line
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const dotenv = require('dotenv');
const webpack = require('webpack');

var extractPlugin = new ExtractTextPlugin({
@@ -12,15 +11,7 @@ var htmlPlugin = new HtmlWebpackPlugin({
  template: 'src/index.html'
});

module.exports = (env) => {
  // call dotenv and it will return an Object with a parsed key
  const environmentalVariable = dotenv.config().parsed;

  // reduce it to a nice object, the same as before
  const envKeys = Object.keys(environmentalVariable).reduce((prev, next) => {
    prev[`process.env.${next}`] = JSON.stringify(environmentalVariable[next]);
    return prev;
  }, {});
module.exports = () => {
 
  return {
    mode: 'development',
@@ -97,16 +88,8 @@ module.exports = (env) => {
      extractPlugin,
      new webpack.DefinePlugin({
        __VERSION__: JSON.stringify('v0.0.0')
      }),
      new webpack.DefinePlugin(envKeys)
    ],
    devServer: {
      proxy: {
        '/': {
          target: 'http://' + (env ? env.MEEP_HOST : ''),
          secure: false
        }
      }
    }
      })
    ]
   
  };
};
+1 −1

File changed.

Contains only whitespace changes.