Production scripts
This commit is contained in:
parent
a33404aeb8
commit
ee4a8d4c9b
|
|
@ -9,37 +9,37 @@ git checkout -b release/"$VERSION_NUMBER"
|
|||
|
||||
#UPDATE PACKAGE FILE
|
||||
echo "Updating Angular App Version"
|
||||
cd source/ticketUI || exit
|
||||
cd ./source/ticketUI || exit
|
||||
jq '."version" = "'"$VERSION_NUMBER"'"' package.json > package."$VERSION_NUMBER".json
|
||||
mv package."$VERSION_NUMBER".json package.json
|
||||
|
||||
#BUILD API
|
||||
echo "Building API:" "$VERSION_NUMBER"
|
||||
cd source/ticketAPI || exit
|
||||
cd ./source/ticketAPI || exit
|
||||
dotnet publish -c release -o artifacts /p:DebugType=None /p:DebugSymbols=false
|
||||
cd ..
|
||||
|
||||
#BUILD UI
|
||||
echo "Building UI:" "$VERSION_NUMBER"
|
||||
cd source/ticketUI || exit
|
||||
cd ./source/ticketUI || exit
|
||||
ng build --configuration=production
|
||||
cd ..
|
||||
|
||||
#PACKAGEING API
|
||||
echo "Creating Docker Container for API"
|
||||
cd source/ticketAPI || exit
|
||||
cd ./source/ticketAPI || exit
|
||||
docker buildx create --name apibuilder-"$VERSION_NUMBER" --driver docker-container --bootstrap --use
|
||||
docker buildx build --platform linux/amd64,linux/arm64 --push -t terralilly85/follicle-api:"$VERSION_NUMBER" .
|
||||
cd ..
|
||||
|
||||
#PACKAGING UI
|
||||
echo "Creating Docker Container for UI"
|
||||
cd source/ticketUI || exit
|
||||
cd ./source/ticketUI || exit
|
||||
docker buildx create --name uibuilder-"$VERSION_NUMBER" --driver docker-container --bootstrap --use
|
||||
docker buildx build --platform linux/amd64,linux/arm64 --push -t terralilly85/follicle-ui:"$VERSION_NUMBER" .
|
||||
cd ..
|
||||
|
||||
#CLEAN UP ARTIFACTS
|
||||
echo "Cleaning up artifacts"
|
||||
rm -r source/ticketAPI/artifacts
|
||||
rm -r source/ticketUI/dist
|
||||
rm -r ./source/ticketAPI/artifacts
|
||||
rm -r ./source/ticketUI/dist
|
||||
5
source/ticketAPI/Dockerfile
Normal file
5
source/ticketAPI/Dockerfile
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
FROM mcr.microsoft.com/dotnet/aspnet:9.0
|
||||
COPY artifacts /app
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["dotnet", "follicleAPI.dll"]
|
||||
4
source/ticketUI/Dockerfile
Normal file
4
source/ticketUI/Dockerfile
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
FROM nginx:latest
|
||||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
16
source/ticketUI/nginx.conf
Normal file
16
source/ticketUI/nginx.conf
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user