diff --git a/.github/workflows/push_docker_image.yml b/.github/workflows/push_docker_image.yml
index f863bd1a..6f614021 100644
--- a/.github/workflows/push_docker_image.yml
+++ b/.github/workflows/push_docker_image.yml
@@ -38,9 +38,11 @@ jobs:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY_FRONTEND: ${{ secrets.AWS_ECR_REPO_NAME_FRONTEND }}
ECR_REPOSITORY_BACKEND: ${{ secrets.AWS_ECR_REPO_NAME_BACKEND }}
+ ECR_REPOSITORY_FRONTEND_NGINX: ${{ secrets.AWS_ECR_REPO_NAME_FRONTEND_NGINX }}
run: |
DOCKER_IMAGE_FRONTEND=tapyrus/explorer-frontend
DOCKER_IMAGE_BACKEND=tapyrus/explorer-backend
+ DOCKER_IMAGE_FRONTEND_NGINX=tapyrus/explorer-frontend-nginx
VERSION=noop
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
@@ -52,6 +54,7 @@ jobs:
fi
TAGS_FRONTEND="${DOCKER_IMAGE_FRONTEND}:${VERSION},${ECR_REGISTRY}/${ECR_REPOSITORY_FRONTEND}:${VERSION}"
TAGS_BACKEND="${DOCKER_IMAGE_BACKEND}:${VERSION},${ECR_REGISTRY}/${ECR_REPOSITORY_BACKEND}:${VERSION}"
+ TAGS_FRONTEND_NGINX="${DOCKER_IMAGE_FRONTEND_NGINX}:${VERSION},${ECR_REGISTRY}/${ECR_REPOSITORY_FRONTEND_NGINX}:${VERSION}"
if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
MINOR=${VERSION%.*}
@@ -60,13 +63,17 @@ jobs:
TAGS_FRONTEND="$TAGS_FRONTEND,${ECR_REGISTRY}/${ECR_REPOSITORY_FRONTEND}:${MINOR},${ECR_REGISTRY}/${ECR_REPOSITORY_FRONTEND}:${MAJOR},${ECR_REGISTRY}/${ECR_REPOSITORY_FRONTEND}:latest"
TAGS_BACKEND="$TAGS_BACKEND,${DOCKER_IMAGE_BACKEND}:${MINOR},${DOCKER_IMAGE_BACKEND}:${MAJOR},${DOCKER_IMAGE_BACKEND}:latest"
TAGS_BACKEND="$TAGS_BACKEND,${ECR_REGISTRY}/${ECR_REPOSITORY_BACKEND}:${MINOR},${ECR_REGISTRY}/${ECR_REPOSITORY_BACKEND}:${MAJOR},${ECR_REGISTRY}/${ECR_REPOSITORY_BACKEND}:latest"
+ TAGS_FRONTEND_NGINX="$TAGS_FRONTEND_NGINX,${DOCKER_IMAGE_FRONTEND_NGINX}:${MINOR},${DOCKER_IMAGE_FRONTEND_NGINX}:${MAJOR},${DOCKER_IMAGE_FRONTEND_NGINX}:latest"
+ TAGS_FRONTEND_NGINX="$TAGS_FRONTEND_NGINX,${ECR_REGISTRY}/${ECR_REPOSITORY_FRONTEND_NGINX}:${MINOR},${ECR_REGISTRY}/${ECR_REPOSITORY_FRONTEND_NGINX}:${MAJOR},${ECR_REGISTRY}/${ECR_REPOSITORY_FRONTEND_NGINX}:latest"
elif [ "${{ github.event_name }}" = "push" ]; then
TAGS_FRONTEND="$TAGS_FRONTEND,${DOCKER_IMAGE_FRONTEND}:sha-${GITHUB_SHA::8},${ECR_REGISTRY}/${ECR_REPOSITORY_FRONTEND}:sha-${GITHUB_SHA::8}"
TAGS_BACKEND="$TAGS_BACKEND,${DOCKER_IMAGE_BACKEND}:sha-${GITHUB_SHA::8},${ECR_REGISTRY}/${ECR_REPOSITORY_BACKEND}:sha-${GITHUB_SHA::8}"
+ TAGS_FRONTEND_NGINX="$TAGS_FRONTEND_NGINX,${DOCKER_IMAGE_FRONTEND_NGINX}:sha-${GITHUB_SHA::8},${ECR_REGISTRY}/${ECR_REPOSITORY_FRONTEND_NGINX}:sha-${GITHUB_SHA::8}"
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=tags-frontend::${TAGS_FRONTEND}
echo ::set-output name=tags-backend::${TAGS_BACKEND}
+ echo ::set-output name=tags-frontend-nginx::${TAGS_FRONTEND_NGINX}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
-
name: Set up QEMU
@@ -118,3 +125,23 @@ jobs:
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.licenses=${{ fromJson(steps.repo.outputs.result).license.spdx_id }}
+ -
+ name: Build and push nginx image
+ id: docker_build_nginx
+ uses: docker/build-push-action@v2
+ with:
+ context: ./nginx
+ file: ./nginx/Dockerfile
+ platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
+ push: true
+ build-args: VERSION=${{ steps.prep.outputs.version }}
+ tags: ${{ steps.prep.outputs.tags-frontend-nginx }}
+ labels: |
+ org.opencontainers.image.title=${{ fromJson(steps.repo.outputs.result).name }}
+ org.opencontainers.image.description=${{ fromJson(steps.repo.outputs.result).description }}
+ org.opencontainers.image.url=${{ fromJson(steps.repo.outputs.result).html_url }}
+ org.opencontainers.image.source=${{ fromJson(steps.repo.outputs.result).clone_url }}
+ org.opencontainers.image.version=${{ steps.prep.outputs.version }}
+ org.opencontainers.image.created=${{ steps.prep.outputs.created }}
+ org.opencontainers.image.revision=${{ github.sha }}
+ org.opencontainers.image.licenses=${{ fromJson(steps.repo.outputs.result).license.spdx_id }}
\ No newline at end of file
diff --git a/backend/libs/rest.js b/backend/libs/rest.js
index f7677d77..ea016839 100644
--- a/backend/libs/rest.js
+++ b/backend/libs/rest.js
@@ -1,11 +1,24 @@
const config = require('./config');
const fetch = require('node-fetch');
+const http = require('node:http');
+const https = require('node:https');
+
+const httpAgent = new http.Agent({ keepAlive: true });
+const httpsAgent = new https.Agent({ keepAlive: true });
+const agentSelector = function (_parsedURL) {
+ if (_parsedURL.protocol == 'http:') {
+ return httpAgent;
+ } else {
+ return httpsAgent;
+ }
+};
+
const baseUrl = `${config.rest.schema}://${config.rest.host}:${config.rest.port}`;
const address = {
stats: async address => {
const url = `${baseUrl}/address/${address}`;
- const response = await fetch(url);
+ const response = await fetch(url, { agent: agentSelector });
if (response.ok) {
return response.json();
} else {
@@ -19,7 +32,7 @@ const address = {
} else {
url = `${baseUrl}/address/${address}/txs`;
}
- const response = await fetch(url);
+ const response = await fetch(url, { agent: agentSelector });
if (response.ok) {
return response.json();
} else {
@@ -31,7 +44,7 @@ const address = {
const transaction = {
get: async txid => {
const url = `${baseUrl}/tx/${txid}`;
- const response = await fetch(url);
+ const response = await fetch(url, { agent: agentSelector });
if (response.ok) {
return response.json();
} else if (response.status === 404) {
@@ -42,7 +55,7 @@ const transaction = {
},
raw: async txid => {
const url = `${baseUrl}/tx/${txid}/hex`;
- const response = await fetch(url);
+ const response = await fetch(url, { agent: agentSelector });
if (response.ok) {
return response.text();
} else if (response.status === 404) {
@@ -56,7 +69,7 @@ const transaction = {
const block = {
get: async blockHash => {
const url = `${baseUrl}/block/${blockHash}`;
- const response = await fetch(url);
+ const response = await fetch(url, { agent: agentSelector });
if (response.ok) {
return response.json();
} else if (response.status === 404) {
@@ -67,7 +80,7 @@ const block = {
},
list: async startIndex => {
const url = `${baseUrl}/blocks/${startIndex}`;
- const response = await fetch(url);
+ const response = await fetch(url, { agent: agentSelector });
if (response.ok) {
return response.json();
} else {
@@ -76,7 +89,7 @@ const block = {
},
height: async height => {
const url = `${baseUrl}/block-height/${height}`;
- const response = await fetch(url);
+ const response = await fetch(url, { agent: agentSelector });
if (response.ok) {
return response.text();
} else if (response.status === 404) {
@@ -87,7 +100,7 @@ const block = {
},
raw: async blockHash => {
const url = `${baseUrl}/block/${blockHash}/header`;
- const response = await fetch(url);
+ const response = await fetch(url, { agent: agentSelector });
if (response.ok) {
return response.text();
} else if (response.status === 404) {
@@ -98,7 +111,7 @@ const block = {
},
status: async blockHash => {
const url = `${baseUrl}/block/${blockHash}/status`;
- const response = await fetch(url);
+ const response = await fetch(url, { agent: agentSelector });
if (response.ok) {
return response.json();
} else if (response.status === 404) {
@@ -110,7 +123,7 @@ const block = {
tip: {
height: async () => {
const url = `${baseUrl}/blocks/tip/height`;
- const response = await fetch(url);
+ const response = await fetch(url, { agent: agentSelector });
if (response.ok) {
return response.json();
} else {
@@ -125,7 +138,7 @@ const block = {
} else {
url = `${baseUrl}/block/${blockHash}/txs`;
}
- const response = await fetch(url);
+ const response = await fetch(url, { agent: agentSelector });
if (response.ok) {
return response.json();
} else {
@@ -137,7 +150,7 @@ const block = {
const color = {
get: async colorId => {
const url = `${baseUrl}/color/${colorId}`;
- const response = await fetch(url);
+ const response = await fetch(url, { agent: agentSelector });
if (response.ok) {
return response.json();
} else {
@@ -151,7 +164,7 @@ const color = {
} else {
url = `${baseUrl}/color/${colorId}/txs`;
}
- const response = await fetch(url);
+ const response = await fetch(url, { agent: agentSelector });
if (response.ok) {
return response.json();
} else {
@@ -168,7 +181,7 @@ const mempool = {
} else {
url = `${baseUrl}/mempool/txs`;
}
- const response = await fetch(url);
+ const response = await fetch(url, { agent: agentSelector });
if (response.ok) {
return {
count: response.headers.get('X-Total-Results'),
diff --git a/frontend/.gitignore b/frontend/.gitignore
index 187d14b8..69bb7c73 100644
--- a/frontend/.gitignore
+++ b/frontend/.gitignore
@@ -17,6 +17,7 @@ $RECYCLE.BIN/
log.txt
npm-debug.log*
+/.angular
/.idea
/.ionic
/.sass-cache
diff --git a/frontend/angular.json b/frontend/angular.json
index 43a26bca..3e9f381c 100644
--- a/frontend/angular.json
+++ b/frontend/angular.json
@@ -1,7 +1,6 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
- "defaultProject": "app",
"newProjectRoot": "projects",
"projects": {
"app": {
@@ -52,7 +51,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
- "extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
@@ -173,7 +171,7 @@
}
},
"cli": {
- "defaultCollection": "@angular-eslint/schematics",
+ "schematicCollections": ["@angular-eslint/schematics"],
"analytics": false
},
"schematics": {
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index f76e1ee7..2dd88422 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -18,11 +18,11 @@
"@ionic-native/splash-screen": "~5.36.0",
"@ionic-native/status-bar": "~5.36.0",
"@ionic/angular": "^6.7.5",
- "@techiediaries/ngx-qrcode": "^9.1.0",
+ "angularx-qrcode": "~16.0.0",
"big.js": "^6.0.3",
"core-js": "^2.6.12",
"moment": "^2.29.4",
- "ngx-pagination": "^5.0.0",
+ "ngx-pagination": "^6.0.3",
"rxjs": "~6.6.3",
"tslib": "^1.14.1",
"zone.js": "~0.13.0"
@@ -42,7 +42,7 @@
"@types/big.js": "^6.0.2",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
- "@types/node": "~8.9.4",
+ "@types/node": "~20.4.0",
"@typescript-eslint/eslint-plugin": "5.59.7",
"@typescript-eslint/parser": "5.59.7",
"codelyzer": "^6.0.1",
@@ -237,14 +237,6 @@
}
}
},
- "node_modules/@angular-devkit/build-angular/node_modules/@types/node": {
- "version": "20.3.3",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.3.tgz",
- "integrity": "sha512-wheIYdr4NYML61AjC8MKj/2jrR/kDQri/CIpVoZwldwhnIrD/j9jIU5bJ8yBKuB2VhpFV7Ab6G2XkBjv9r9Zzw==",
- "dev": true,
- "optional": true,
- "peer": true
- },
"node_modules/@angular-devkit/build-angular/node_modules/@vitejs/plugin-basic-ssl": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.0.1.tgz",
@@ -4066,22 +4058,6 @@
"npm": ">=6.0.0"
}
},
- "node_modules/@techiediaries/ngx-qrcode": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/@techiediaries/ngx-qrcode/-/ngx-qrcode-9.1.0.tgz",
- "integrity": "sha512-pjDt+eBjxDds7Iz47VhoSUlv4NiPuSWyMo44GiC7ZLoozBoAo6ga6bW7XS6F89omiWVMJ7Gphh5XI2SAcpfzAg==",
- "dependencies": {
- "qrcode": "^1.4.4",
- "tslib": "^1.10.0"
- },
- "engines": {
- "node": ">=10.0.0"
- },
- "peerDependencies": {
- "@angular/common": ">=6.0.0 || <=10.0.0",
- "@angular/core": ">=6.0.0 || <=10.0.0"
- }
- },
"node_modules/@tootallnate/once": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
@@ -4276,10 +4252,9 @@
"dev": true
},
"node_modules/@types/node": {
- "version": "8.9.5",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.5.tgz",
- "integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==",
- "dev": true
+ "version": "20.4.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.0.tgz",
+ "integrity": "sha512-jfT7iTf/4kOQ9S7CHV9BIyRaQqHu67mOjsIQBC3BKZvzvUB6zLxEwJ6sBE3ozcvP8kF6Uk5PXN0Q+c0dfhGX0g=="
},
"node_modules/@types/q": {
"version": "0.0.32",
@@ -4287,6 +4262,14 @@
"integrity": "sha512-qYi3YV9inU/REEfxwVcGZzbS3KG/Xs90lv0Pr+lDtuVjBPGd1A+eciXzVSaRvLify132BfcvhvEjeVahrUl0Ug==",
"dev": true
},
+ "node_modules/@types/qrcode": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.0.tgz",
+ "integrity": "sha512-x5ilHXRxUPIMfjtM+1vf/GPTRWZ81nqscursm5gMznJeK9M0YnZ1c3bEvRLQ0zSSgedLx1J6MGL231ObQGGhaA==",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
"node_modules/@types/qs": {
"version": "6.9.7",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
@@ -5018,6 +5001,24 @@
"ajv": "^8.8.2"
}
},
+ "node_modules/angularx-qrcode": {
+ "version": "16.0.0",
+ "resolved": "https://registry.npmjs.org/angularx-qrcode/-/angularx-qrcode-16.0.0.tgz",
+ "integrity": "sha512-j6IndIU3m4zfqSPKraJPFgigdHa+pM3kapRPBnKSwgKNSpljPQu3XNiRUCmQmfGfnh39ShDVca/k091WTjngAA==",
+ "dependencies": {
+ "@types/qrcode": "1.5.0",
+ "qrcode": "1.5.1",
+ "tslib": "^2.3.0"
+ },
+ "peerDependencies": {
+ "@angular/core": "^16.0.0"
+ }
+ },
+ "node_modules/angularx-qrcode/node_modules/tslib": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz",
+ "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA=="
+ },
"node_modules/ansi-colors": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz",
@@ -7143,12 +7144,6 @@
"node": ">=10.0.0"
}
},
- "node_modules/engine.io/node_modules/@types/node": {
- "version": "20.3.3",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.3.tgz",
- "integrity": "sha512-wheIYdr4NYML61AjC8MKj/2jrR/kDQri/CIpVoZwldwhnIrD/j9jIU5bJ8yBKuB2VhpFV7Ab6G2XkBjv9r9Zzw==",
- "dev": true
- },
"node_modules/enhanced-resolve": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz",
@@ -11975,14 +11970,22 @@
"dev": true
},
"node_modules/ngx-pagination": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/ngx-pagination/-/ngx-pagination-5.1.1.tgz",
- "integrity": "sha512-KxHES+Dn6pbetytO9ng2GAdclmo4UcwzFmQyVPWh2xRPbAlv5/ezL2xnDVBFMqCoJQaZagvdQ+ZZFbqGWqAvCQ==",
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/ngx-pagination/-/ngx-pagination-6.0.3.tgz",
+ "integrity": "sha512-lONjTQ7hFPh1SyhwDrRd5ZwM4NMGQ7bNR6vLrs6mrU0Z8Q1zCcWbf/pvyp4DOlGyd9uyZxRy2wUsSZLeIPjbAw==",
+ "dependencies": {
+ "tslib": "^2.3.0"
+ },
"peerDependencies": {
- "@angular/common": ">=5.0.0",
- "@angular/core": ">=5.0.0"
+ "@angular/common": ">=13.0.0",
+ "@angular/core": ">=13.0.0"
}
},
+ "node_modules/ngx-pagination/node_modules/tslib": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz",
+ "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA=="
+ },
"node_modules/nice-napi": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz",
@@ -13797,9 +13800,9 @@
}
},
"node_modules/qrcode": {
- "version": "1.5.3",
- "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.3.tgz",
- "integrity": "sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg==",
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.1.tgz",
+ "integrity": "sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==",
"dependencies": {
"dijkstrajs": "^1.0.1",
"encode-utf8": "^1.0.3",
diff --git a/frontend/package.json b/frontend/package.json
index ae173829..3e4f2169 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -25,11 +25,11 @@
"@ionic-native/splash-screen": "~5.36.0",
"@ionic-native/status-bar": "~5.36.0",
"@ionic/angular": "^6.7.5",
- "@techiediaries/ngx-qrcode": "^9.1.0",
+ "angularx-qrcode": "~16.0.0",
"big.js": "^6.0.3",
"core-js": "^2.6.12",
"moment": "^2.29.4",
- "ngx-pagination": "^5.0.0",
+ "ngx-pagination": "^6.0.3",
"rxjs": "~6.6.3",
"tslib": "^1.14.1",
"zone.js": "~0.13.0"
@@ -49,7 +49,7 @@
"@types/big.js": "^6.0.2",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
- "@types/node": "~8.9.4",
+ "@types/node": "~20.4.0",
"@typescript-eslint/eslint-plugin": "5.59.7",
"@typescript-eslint/parser": "5.59.7",
"codelyzer": "^6.0.1",
diff --git a/frontend/src/app/address/address.module.ts b/frontend/src/app/address/address.module.ts
index 9eb0fa14..a6d4a93a 100644
--- a/frontend/src/app/address/address.module.ts
+++ b/frontend/src/app/address/address.module.ts
@@ -7,7 +7,7 @@ import { IonicModule } from '@ionic/angular';
import { AddressPageRoutingModule } from './address-routing.module';
import { AddressPage } from './address.page';
-import { NgxQRCodeModule } from '@techiediaries/ngx-qrcode';
+import { QRCodeModule } from 'angularx-qrcode';
import { SharedPipeModule } from '../modules/sharePipe.module';
import { NgxPaginationModule } from 'ngx-pagination';
@@ -19,7 +19,7 @@ import { NgxPaginationModule } from 'ngx-pagination';
AddressPageRoutingModule,
SharedPipeModule,
NgxPaginationModule,
- NgxQRCodeModule
+ QRCodeModule
],
declarations: [AddressPage]
})
diff --git a/frontend/src/app/address/address.page.html b/frontend/src/app/address/address.page.html
index d706bb43..d032a35d 100644
--- a/frontend/src/app/address/address.page.html
+++ b/frontend/src/app/address/address.page.html
@@ -22,12 +22,7 @@
-
-
+
diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts
index 134dd539..8ac8aa1a 100644
--- a/frontend/src/app/app-routing.module.ts
+++ b/frontend/src/app/app-routing.module.ts
@@ -60,8 +60,7 @@ const routes: Routes = [
@NgModule({
imports: [
RouterModule.forRoot(routes, {
- preloadingStrategy: PreloadAllModules,
- relativeLinkResolution: 'legacy'
+ preloadingStrategy: PreloadAllModules
})
],
exports: [RouterModule]
diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts
index e4a96a98..0544f2c1 100644
--- a/frontend/src/app/app.module.ts
+++ b/frontend/src/app/app.module.ts
@@ -16,7 +16,6 @@ import { ConfigService } from './config.service';
@NgModule({
declarations: [AppComponent, FooterComponent],
- entryComponents: [],
imports: [
BrowserModule,
IonicModule.forRoot(),
diff --git a/frontend/src/app/block/block.module.ts b/frontend/src/app/block/block.module.ts
index 9d8a28e1..4c2cebf7 100644
--- a/frontend/src/app/block/block.module.ts
+++ b/frontend/src/app/block/block.module.ts
@@ -21,7 +21,6 @@ import { BlockRawdataPageModule } from '../block-rawdata/block-rawdata.module';
SharedPipeModule,
BlockRawdataPageModule
],
- declarations: [BlockPage],
- entryComponents: [BlockRawdataPage]
+ declarations: [BlockPage]
})
export class BlockPageModule {}
diff --git a/frontend/src/app/color/color.module.ts b/frontend/src/app/color/color.module.ts
index f127ddbe..91de6ff8 100644
--- a/frontend/src/app/color/color.module.ts
+++ b/frontend/src/app/color/color.module.ts
@@ -18,7 +18,6 @@ import { NgxPaginationModule } from 'ngx-pagination';
NgxPaginationModule,
SharedPipeModule
],
- declarations: [ColorPage],
- entryComponents: []
+ declarations: [ColorPage]
})
export class ColorPageModule {}
diff --git a/frontend/src/app/transaction/transaction.module.ts b/frontend/src/app/transaction/transaction.module.ts
index c1afdde0..b4115f08 100644
--- a/frontend/src/app/transaction/transaction.module.ts
+++ b/frontend/src/app/transaction/transaction.module.ts
@@ -19,7 +19,6 @@ import { TransactionRawdataPageModule } from '../transaction-rawdata/transaction
TransactionPageRoutingModule,
TransactionRawdataPageModule
],
- declarations: [TransactionPage],
- entryComponents: [TransactionRawdataPage]
+ declarations: [TransactionPage]
})
export class TransactionPageModule {}
diff --git a/nginx/Dockerfile b/nginx/Dockerfile
new file mode 100644
index 00000000..9ca51e30
--- /dev/null
+++ b/nginx/Dockerfile
@@ -0,0 +1,8 @@
+ARG VERSION=latest
+FROM tapyrus/explorer-frontend:${VERSION} as builder
+RUN npm run build -- --configuration=production
+
+FROM nginx:1.17
+COPY --from=builder /app/www /usr/share/nginx/html
+COPY config.json /usr/share/nginx/html/assets
+COPY nginx.conf /etc/nginx/conf.d/default.conf
diff --git a/nginx/config.json b/nginx/config.json
new file mode 100644
index 00000000..fe590186
--- /dev/null
+++ b/nginx/config.json
@@ -0,0 +1,4 @@
+{
+ "backendUrl": "https://testnet-explorer.tapyrus.dev.chaintope.com",
+ "project": "Tapyrus Testnet"
+}
\ No newline at end of file
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
new file mode 100644
index 00000000..b9d8d504
--- /dev/null
+++ b/nginx/nginx.conf
@@ -0,0 +1,17 @@
+server {
+ listen 80;
+ server_name localhost;
+
+ location / {
+ root /usr/share/nginx/html;
+ index index.html index.htm;
+ try_files $uri$args $uri$args/ /index.html;
+ }
+
+ # redirect server error pages to the static page /50x.html
+ #
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root /usr/share/nginx/html;
+ }
+}
\ No newline at end of file