-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-build.sh
39 lines (29 loc) · 935 Bytes
/
docker-build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# Pull the node:18 Docker image
docker pull node:18
# Run a Docker container based on the node:18 image
docker run -u root -v /etc/localtime:/etc/localtime:ro -v "$(pwd):/elcom-electricity-price-website" -w /elcom-electricity-price-website --rm node:18 bash -c '
# Inside the Docker container
# Print Node.js version
node -v
# Set environment variables
if [ "$CFSPACE" == "ref" ]; then
export GITLAB_WIKI_URL=""
export GITLAB_WIKI_TOKEN=""
export WEBPACK_ASSET_PREFIX=""
else
export GITLAB_WIKI_URL="gitlab.ldbar.ch/api/v4/projects/73/wikis"
export GITLAB_WIKI_TOKEN=""
export WEBPACK_ASSET_PREFIX=""
fi
# Disable strict SSL in Yarn
yarn config set 'strict-ssl' false
# Install dependencies and build
yarn build
# Change directory to "screenshot-service"
cd ./screenshot-service
# Disable strict SSL in Yarn
yarn config set 'strict-ssl' false
# Install dependencies and build
yarn build
'