Updating dockerfile and production build script

This commit is contained in:
Tara Wilson 2025-02-20 20:51:20 -05:00
parent acc339768e
commit 1438a2c235
3 changed files with 24 additions and 2 deletions

1
.gitignore vendored
View File

@ -27,3 +27,4 @@
/dataSources.local.xml
**/source/.angular/cache
**/source/dist/*

View File

@ -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;"]

View File

@ -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