Skip to content

Commit

Permalink
feat(#26): dgca-issuance-service upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
jhagestedt authored May 2, 2021
1 parent 1295041 commit 0513812
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 17 deletions.
30 changes: 30 additions & 0 deletions .grenrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
"dataSource": "prs",
"prefix": "",
"onlyMilestones": false,
"groupBy": {
"Enhancements": [
"enhancement",
"internal"
],
"Bug Fixes": [
"bug"
],
"Documentation": [
"documentation"
],
"Others": [
"other"
]
},
"changelogFilename": "CHANGELOG.md",
"template": {
commit: ({ message, url, author, name }) => `- [${message}](${url}) - ${author ? `@${author}` : name}`,
issue: "- {{name}} [{{text}}]({{url}})",
noLabel: "other",
group: "\n#### {{heading}}\n",
changelogTitle: "# Changelog\n\n",
release: "## {{release}} ({{date}})\n{{body}}",
releaseSeparator: "\n---\n\n"
}
}
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ RUN yarn && yarn build
FROM nginx:1.19.10 as app
COPY --from=build ./app/build /usr/share/nginx/html
COPY nginx/default.conf.template /etc/nginx/templates/default.conf.template
ENV DGCI_WEB_PORT=80
ENV DGCI_SERVICE_HOST=localhost
ENV DGCI_SERVICE_PORT=8080
ENV SERVER_PORT=80
ENV DGCA_ISSUANCE_SERVICE_URL=http://localhost:8080
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ services:
ports:
- 8080:8080
environment:
- DGCI_WEB_PORT=8080
- DGCI_SERVICE_HOST=dgc-issuance-service
- DGCI_SERVICE_PORT=8081
- SERVER_PORT=8080
- DGCA_ISSUANCE_SERVICE_URL=http://dgc-issuance-service:8081
networks:
internal:

Expand Down
13 changes: 4 additions & 9 deletions nginx/default.conf.template
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
upstream service {
server ${DGCI_SERVICE_HOST}:${DGCI_SERVICE_PORT};
}

server {
listen ${DGCI_WEB_PORT};
listen ${SERVER_PORT};
server_tokens off;
location / {
root /usr/share/nginx/html;
index unresolvable-file-html.html;
Expand All @@ -15,9 +12,7 @@ server {
expires 0;
try_files /index.html =404;
}
location /service/ {
#proxy_set_header X-Forwarded-For $remote_addr;
#proxy_set_header Host $http_host;
proxy_pass http://service/;
location /dgca-issuance-service/ {
proxy_pass ${DGCA_ISSUANCE_SERVICE_URL}/;
}
}
4 changes: 2 additions & 2 deletions src/misc/edgcQRGenerator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ interface SigResponse {


const signerCall = (id: string, hash: string): Promise<SigResponse> => {
return api.put('/service/dgci/' + id, { hash: hash })
return api.put('/dgca-issuance-service/dgci/' + id, { hash: hash })
.then(res => {
const sigResponse: SigResponse = res.data;
return sigResponse;
Expand All @@ -71,7 +71,7 @@ const generateQRCode = (edgcPayload: EUDGC): Promise<CertResult> => {

let tan: string = '';

return api.post('/service/dgci', certInit)
return api.post('/dgca-issuance-service/dgci', certInit)
.then(response => {
const certMetaData: CertificateMetaData = response.data;
// TODO copy dgci to EUDGC
Expand Down

0 comments on commit 0513812

Please sign in to comment.