-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
477544b
commit be73b74
Showing
9 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM nginx:stable-alpine | ||
COPY nginx_conf/nginx.conf /etc/nginx/nginx.conf | ||
COPY dist/* /usr/share/nginx/html/ | ||
|
||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/sh | ||
# Start parameters: | ||
# 1.-fileConfig | ||
# Example: ./build_Docker.sh ./nginx_conf/.env.dev | ||
|
||
# Init variables | ||
fileConfig=$1; | ||
now="$(date +'%d-%m-%Y %H:%M:%S:%3N')" | ||
base_dir=`pwd` | ||
|
||
# Load environment variables | ||
if [ -f "$fileConfig" ] | ||
then | ||
echo "" | ||
echo " Loading config from $fileConfig" | ||
echo "" | ||
|
||
while IFS='=' read -r key value | ||
do | ||
key=$(echo $key | tr '.' '_') | ||
eval ${key}='${value}' | ||
done < "$fileConfig" | ||
|
||
echo " Date: "${now} | ||
echo " ======================================================" | ||
echo "" | ||
echo " Initializing variables " | ||
echo "" | ||
echo " ======================================================" | ||
echo " REGISTRY_NAME="${REGISTRY_NAME} | ||
|
||
else | ||
echo "$fileConfig not found." | ||
fi | ||
|
||
#./gradlew :itachallenge-challenge:clean && ./gradlew :itachallenge-challenge:build | ||
|
||
ng build --configuration production | ||
|
||
docker build -t=${REGISTRY_NAME}:nginx-itachallenge-${NGINX_FRONTEND_TAG} . | ||
|
||
#upload image to DockerHub | ||
if [ ${ENV} = "dev" ] || [ ${ENV} = "pre" ]; | ||
then | ||
docker push ${REGISTRY_NAME}:nginx-itachallenge-${NGINX_FRONTEND_TAG} | ||
fi |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.env.d* filter=git-crypt diff=git-crypt | ||
.env.p* filter=git-crypt diff=git-crypt | ||
.gitattributes !filter !diff |
Empty file.
Binary file not shown.
File renamed without changes.
Binary file not shown.
File renamed without changes.