Updating dockerfile and production build script
This commit is contained in:
parent
acc339768e
commit
1438a2c235
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -27,3 +27,4 @@
|
|||
/dataSources.local.xml
|
||||
|
||||
**/source/.angular/cache
|
||||
**/source/dist/*
|
||||
|
|
@ -1,4 +1,10 @@
|
|||
FROM nginx:latest
|
||||
COPY /source /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
EXPOSE 80
|
||||
EXPOSE 80
|
||||
|
||||
FROM nginx:latest
|
||||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY dist/troop20web /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
|
@ -3,8 +3,23 @@ echo "Setting Version"
|
|||
VERSION_NUMBER=$(date +%Y)"."$(date +%m)"."$(date +%d)
|
||||
echo $VERSION_NUMBER
|
||||
|
||||
#RESTORE PACKAGES
|
||||
cd source || exit
|
||||
yarn install
|
||||
cd ..
|
||||
|
||||
#BUILD UI
|
||||
echo "Building:" "$VERSION_NUMBER"
|
||||
cd source || exit
|
||||
ng build --configuration=production
|
||||
cd ..
|
||||
|
||||
#PACKAGE
|
||||
echo "Dockerizing"
|
||||
docker build -t troop20-web:$VERSION_NUMBER -f Dockerfile .
|
||||
docker tag troop20-web:$VERSION_NUMBER terralilly85/troop20-web:$VERSION_NUMBER
|
||||
docker buildx build --platform linux/arm64 --push -t terralilly85/troop20-web:$VERSION_NUMBER .
|
||||
docker buildx build --platform linux/arm64 --push -t terralilly85/troop20-web:$VERSION_NUMBER .
|
||||
|
||||
#CLEAN UP ARTIFACTS
|
||||
echo "Cleaning up artifacts"
|
||||
rm -r source/dist
|
||||
Loading…
Reference in New Issue
Block a user