Newer
Older
file: panter-kubernetes-base.yml
app-build:
extends: .app-build
script:
- cd $APP_PATH
- echo "add healthcheck package"
- meteor add panter:healthroute --allow-superuser
- meteor add qualia:prod-shell --allow-superuser
- echo "current path is $(pwd)"
- yarn
- echo "building into $CI_PROJECT_DIR"
- TOOL_NODE_FLAGS="--max_old_space_size=3072 --min_semi_space_size=8 --max_semi_space_size=256" --optimize_for_size meteor build $CI_PROJECT_DIR --architecture os.linux.x86_64 --allow-superuser --server-only --directory
artifacts:
paths:
- $CI_PROJECT_DIR/bundle
.ensureDocker: &ensureDocker |
function ensureDockerfile() {
# this is for meteor
if [ ! -f Dockerfile ]; then
echo "Creating Dockerfile"
NODE_VERSION_FULL=$(cat bundle/.node_version.txt)
NODE_VERSION=${NODE_VERSION_FULL/v} # remove v
cat > Dockerfile <<EOF
FROM node:$NODE_VERSION
ADD . /src
RUN cd /src && rm -rf node_modules
RUN cd /src/bundle/programs/server && npm install
WORKDIR /src/bundle
EXPOSE 8888
CMD ["node", "main.js"]
EOF
fi
}