Delete a bunch of angular/deso stuff we won't need post-angular
This commit is contained in:
parent
7cd0eee93b
commit
14d36075fc
10 changed files with 0 additions and 334 deletions
|
@ -1,2 +0,0 @@
|
|||
# For now, tag everyone who wants to participate
|
||||
* @deso-protocol/reviewers
|
46
Caddyfile
46
Caddyfile
|
@ -1,46 +0,0 @@
|
|||
# Global caddy config options must be first
|
||||
{
|
||||
admin off
|
||||
auto_https off
|
||||
}
|
||||
|
||||
# Bind to port 82
|
||||
:82
|
||||
|
||||
# Serve static files
|
||||
file_server
|
||||
|
||||
# Fallback to index.html for everything but assets
|
||||
@html {
|
||||
not path *.js *.css *.png *.svg *.ttf *.woff2
|
||||
|
||||
file index.html
|
||||
}
|
||||
|
||||
handle_errors {
|
||||
header Cache-Control no-store
|
||||
}
|
||||
|
||||
rewrite @html {http.matchers.file.relative}
|
||||
|
||||
# Don't cache index.html and set CSP
|
||||
header @html Cache-Control no-store
|
||||
header @html Content-Security-Policy "
|
||||
default-src 'self';
|
||||
connect-src
|
||||
{$DOMAIN:https://node.deso.org}/api/v0/get-users-stateless
|
||||
{$DOMAIN:https://node.deso.org}/api/v0/get-app-state
|
||||
{$DOMAIN:https://node.deso.org}/api/v0/get-referral-info-for-referral-hash
|
||||
{$DOMAIN:https://node.deso.org}/api/v0/get-user-derived-keys
|
||||
{$DOMAIN:https://node.deso.org}/api/v0/get-transaction-spending
|
||||
{$DOMAIN:https://node.deso.org}/api/v0/send-phone-number-verification-text
|
||||
{$DOMAIN:https://node.deso.org}/api/v0/submit-phone-number-verification-code
|
||||
img-src 'self'
|
||||
{$DOMAIN:https://node.deso.org}/api/v0/get-single-profile-picture/;
|
||||
style-src 'self' 'unsafe-inline'
|
||||
https://fonts.googleapis.com
|
||||
https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css;
|
||||
font-src 'self'
|
||||
https://fonts.googleapis.com
|
||||
https://fonts.gstatic.com
|
||||
https://ka-f.fontawesome.com;"
|
43
Dockerfile
43
Dockerfile
|
@ -1,43 +0,0 @@
|
|||
FROM node:14.15.5-alpine3.13 AS identity
|
||||
|
||||
WORKDIR /identity
|
||||
|
||||
RUN apk add git
|
||||
|
||||
COPY ./package.json .
|
||||
COPY ./package-lock.json .
|
||||
COPY ./.npmrc .
|
||||
|
||||
# use yarn to upgrade npm
|
||||
RUN yarn global add npm@7
|
||||
|
||||
# install frontend dependencies before copying the frontend code
|
||||
# into the container so we get docker cache benefits
|
||||
RUN npm install
|
||||
|
||||
# don't allow any dependencies with vulnerabilities
|
||||
#RUN npx audit-ci --low
|
||||
|
||||
# running ngcc before build_prod lets us utilize the docker
|
||||
# cache and significantly speeds up builds without requiring us
|
||||
# to import/export the node_modules folder from the container
|
||||
RUN npm run ngcc
|
||||
|
||||
COPY ./angular.json .
|
||||
COPY ./tsconfig.json .
|
||||
COPY ./tsconfig.app.json .
|
||||
COPY ./webpack.config.js .
|
||||
COPY ./tslint.json .
|
||||
COPY ./src ./src
|
||||
|
||||
RUN npm run build_prod
|
||||
|
||||
# build minified version of frontend, served using caddy
|
||||
FROM caddy:2.3.0-alpine
|
||||
|
||||
WORKDIR /identity
|
||||
|
||||
COPY ./Caddyfile .
|
||||
COPY --from=identity /identity/dist/identity .
|
||||
|
||||
ENTRYPOINT ["caddy", "run"]
|
17
angular.json
17
angular.json
|
@ -88,23 +88,6 @@
|
|||
"browserTarget": "identity:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-bulders/custom-webpack:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": []
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
# For now, tag everyone who wants to participate
|
||||
* @deso-protocol/reviewers
|
|
@ -1,83 +0,0 @@
|
|||
# Global caddy config options must be first
|
||||
{
|
||||
admin off
|
||||
auto_https off
|
||||
}
|
||||
|
||||
# Bind to port 80
|
||||
:80
|
||||
|
||||
# Serve static files
|
||||
file_server
|
||||
|
||||
# Fallback to index.html for everything but assets
|
||||
@html {
|
||||
not path *.js *.css *.png *.jpg *.svg *.pdf *.eot *.ttf *.woff *.woff2 *.webmanifest
|
||||
|
||||
file index.html
|
||||
}
|
||||
|
||||
handle_errors {
|
||||
header Cache-Control no-store
|
||||
}
|
||||
|
||||
rewrite @html {http.matchers.file.relative}
|
||||
|
||||
# Don't cache index.html and set CSP
|
||||
header @html Cache-Control no-store
|
||||
header @html Content-Security-Policy "
|
||||
default-src 'self';
|
||||
connect-src 'self'
|
||||
node.deso.org
|
||||
amp.deso.org
|
||||
bithunt.deso.org
|
||||
https://altumbase.com
|
||||
localhost:*
|
||||
https://api.blockchain.com/ticker
|
||||
https://api.blockchain.com/mempool/fees
|
||||
https://ka-f.fontawesome.com/
|
||||
bitcoinfees.earn.com
|
||||
api.blockcypher.com
|
||||
api.testwyre.com
|
||||
api.sendwyre.com
|
||||
https://videodelivery.net
|
||||
https://upload.videodelivery.net;
|
||||
script-src 'self'
|
||||
https://kit.fontawesome.com/070ca4195b.js
|
||||
https://ka-f.fontawesome.com/;
|
||||
style-src 'self'
|
||||
'unsafe-inline'
|
||||
https://fonts.googleapis.com
|
||||
https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css;
|
||||
img-src 'self'
|
||||
data:
|
||||
i.imgur.com
|
||||
images.deso.org
|
||||
quickchart.io
|
||||
arweave.net
|
||||
*.arweave.net
|
||||
*.pearl.app
|
||||
cloudflare-ipfs.com;
|
||||
font-src 'self'
|
||||
https://fonts.googleapis.com
|
||||
https://fonts.gstatic.com
|
||||
https://ka-f.fontawesome.com;
|
||||
frame-src 'self'
|
||||
localhost:*
|
||||
identity.deso.org
|
||||
identity.deso.blue
|
||||
identity.deso.green
|
||||
https://geo.captcha-delivery.com
|
||||
https://www.youtube.com
|
||||
https://youtube.com
|
||||
https://player.vimeo.com
|
||||
https://www.tiktok.com
|
||||
https://giphy.com
|
||||
https://open.spotify.com
|
||||
https://w.soundcloud.com
|
||||
https://player.twitch.tv
|
||||
https://clips.twitch.tv
|
||||
pay.testwyre.com
|
||||
pay.sendwyre.com
|
||||
https://iframe.videodelivery.net;
|
||||
frame-ancestors 'self';"
|
|
@ -1,60 +0,0 @@
|
|||
FROM node:14.15.5-alpine3.13 AS frontend
|
||||
|
||||
WORKDIR /frontend
|
||||
|
||||
# install git
|
||||
RUN apk add git
|
||||
|
||||
# use yarn to upgrade npm
|
||||
RUN yarn global add npm@7
|
||||
|
||||
COPY ./package.json .
|
||||
COPY ./package-lock.json .
|
||||
COPY ./.npmrc .
|
||||
|
||||
# install frontend dependencies before copying the frontend code
|
||||
# into the container so we get docker cache benefits
|
||||
RUN npm install
|
||||
|
||||
# don't allow any dependencies with vulnerabilities
|
||||
#RUN npx audit-ci --low
|
||||
|
||||
# running ngcc before build_prod lets us utilize the docker
|
||||
# cache and significantly speeds up builds without requiring us
|
||||
# to import/export the node_modules folder from the container
|
||||
RUN npm run ngcc
|
||||
|
||||
COPY ./angular.json .
|
||||
COPY ./tsconfig.json .
|
||||
COPY ./src ./src
|
||||
|
||||
# use --build-arg index=index.custom.html to specify a custom index.html file
|
||||
ARG index=index.html
|
||||
|
||||
# overwrite default index file with custom file
|
||||
COPY ./src/$index ./src/index.html
|
||||
|
||||
# use --build-arg environment=custom to specify a custom environment
|
||||
ARG environment=prod
|
||||
|
||||
# overwrite default environment file with custom file
|
||||
COPY ./src/environments/environment.$environment.ts ./src/environments/environment.prod.ts
|
||||
|
||||
RUN npm run build_prod
|
||||
|
||||
# build minified version of frontend, served using caddy
|
||||
FROM caddy:2.3.0-alpine
|
||||
|
||||
WORKDIR /frontend
|
||||
|
||||
COPY ./Caddyfile .
|
||||
COPY --from=frontend /frontend/dist .
|
||||
|
||||
# We use a run.sh script so that we can pass environment variables
|
||||
# to it.
|
||||
COPY ./run.sh .
|
||||
|
||||
# Default options overrideable by docker-compose
|
||||
ENV CADDY_FILE "/frontend/Caddyfile"
|
||||
|
||||
ENTRYPOINT ["/frontend/run.sh"]
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Loading Caddy config from file: ${CADDY_FILE}"
|
||||
|
||||
caddy run --config ${CADDY_FILE}
|
|
@ -1,32 +0,0 @@
|
|||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, '../coverage/electron-angular-app'),
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
fixWebpackSourcePaths: true
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false,
|
||||
restartOnFileChange: true
|
||||
});
|
||||
};
|
|
@ -1,44 +0,0 @@
|
|||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
jasmine: {
|
||||
// you can add configuration options for Jasmine here
|
||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
||||
// for example, you can disable the random execution with `random: false`
|
||||
// or set a specific seed with `seed: 4321`
|
||||
},
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
jasmineHtmlReporter: {
|
||||
suppressAll: true // removes the duplicated traces
|
||||
},
|
||||
coverageReporter: {
|
||||
dir: require('path').join(__dirname, './coverage/identity'),
|
||||
subdir: '.',
|
||||
reporters: [
|
||||
{ type: 'html' },
|
||||
{ type: 'text-summary' }
|
||||
]
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false,
|
||||
restartOnFileChange: true
|
||||
});
|
||||
};
|
Loading…
Reference in a new issue