Skip to content

Commit

Permalink
Merge pull request #48 from suchyba/32-fix-api-url-to-use-parameter-w…
Browse files Browse the repository at this point in the history
…hile-starting-container

32 fix api url to use parameter while starting container
  • Loading branch information
suchyba authored Sep 24, 2023
2 parents ca1f595 + b0d7a65 commit 6b69de1
Show file tree
Hide file tree
Showing 39 changed files with 8,347 additions and 6,659 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ jobs:
images: ${{ inputs.REGISTRY }}/${{ inputs.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},enable=${{ !inputs.DEV_RELEASE }}
type=raw,value=lastest,enabled=${{ !inputs.DEV_RELEASE }}
type=raw,value=lastest-DEV,enabled=${{ inputs.DEV_RELEASE }}
type=raw,value=latest-DEV,enabled=${{ inputs.DEV_RELEASE }}
type=sha,prefix=DEV-,format=short,enable=${{ inputs.DEV_RELEASE }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM node:latest as node
WORKDIR /app
EXPOSE 443
EXPOSE 80

#Build app
COPY package*.json /app/
Expand All @@ -12,4 +13,7 @@ RUN npm run build -- --output-path=./dist/out --configuration $configuration
#Copy app to nginx
FROM nginx:alpine
COPY --from=node /app/dist/out/ /usr/share/nginx/html
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf

# When the container starts, replace the env.js with values from environment variables
CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/assets/env.template.js > /usr/share/nginx/html/assets/env.js && exec nginx -g 'daemon off;'"]
5 changes: 4 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,8 @@
}
}
},
"defaultProject": "GroupBy.Web.App"
"defaultProject": "GroupBy.Web.App",
"cli": {
"analytics": false
}
}
5 changes: 5 additions & 0 deletions nginx-custom.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
server {
listen 80 default_server;
return 301 https://$host$request_uri;
}

server {
listen 443 ssl;
ssl_certificate /etc/nginx/certs/server.crt;
Expand Down
Loading

0 comments on commit 6b69de1

Please sign in to comment.