cleanup & update Dockerfile

This commit is contained in:
simon987 2021-02-21 09:25:18 -05:00
parent f49ddeec8d
commit 93729483ab
7 changed files with 155 additions and 56 deletions

View File

@ -1,5 +1,5 @@
.DS_Store
node_modules/
**/node_modules/
dist/
npm-debug.log*
yarn-debug.log*

View File

@ -8,4 +8,7 @@ RUN npm run build
FROM nginx:alpine
COPY --from=build /app/dist/ /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
COPY ./gpg /www/gpg/
COPY ./keybase /www/keybase/
COPY --from=build /app/dist/ /www/

50
gpg/gpg.txt Normal file
View File

@ -0,0 +1,50 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF/HwsABEACBS17msktleLRdTcDxuzLWQm+TYg7EwcCsqLa5OJ4pbJPwti3e
v4s+DDk4sKG+O8vSG/k7Ep/b5OMgx3Qwd84PWlWBcvMXPZXnTKIO6qmKJji075OU
oYwyMXF1vSjAWP+VSuQCvXJArtjpGmTcoZPwA2xsnd5Kjy9bNYoplcBpzC7HP/nC
YD9YVZFgzyLYgvaXIyQwLO3Sc2dTrwbQnF8EyZG95DR/mhtezzoqmUsZnEWY6lB1
ZnvcExCiC8jfJLoVGjbRC/+9i0hFTBr6o2GsixQzn4mnfCtsXdvr+h7CL+ybmUhD
BEC055wetVF1xEcWWGSNoulCcZ5Gcvd89scqoB+P0iu/p2oyIIWASfu9E7t8iW0a
g+LIDABLbErBcQ7zd7D482VK2FnG761dgl5ZqYNpOKnBLE2Zkkfm2C5owCTtXC7p
4rJWwjssMnll40dpw/Tl5Vw00WbfOrtcLMvP4ZokzUjF9zwsYCi/KpXIXfnhxFmU
qOUce3qvC06j2XP9defY11Is7fvz2jbxva1pDQIHt+ULcuVHdufYa9YE0AZ4RLgd
74R80s5ojLE2MyNsjqCZAVxUz08ZlM1kZB8OB5d9wCRuFN2HkNRY2Tz9XxNggFWa
lAHhKa4C8cbsOB3GhO1VfJKbf9o+hUMAldP2dHNRQH8857+dWZxRjBY3TwARAQAB
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OVtEyGBMZk/uuf0fzHjQHx8iaqRH/TjUvq65MmVlC925Ljeqb
XFa4WICgF+MPtp3XhhKI66wkVWuAgXuMdoRMQQ==
=OsYe
-----END PGP PUBLIC KEY BLOCK-----

48
jenkins/Jenkinsfile vendored
View File

@ -1,48 +0,0 @@
def remote = [:]
remote.name = 'remote'
remote.host = env.DEPLOY_HOST
remote.user = env.DEPLOY_USER
remote.identityFile = '/var/lib/jenkins/.ssh/id_rsa'
remote.knownHosts = '/var/lib/jenkins/.ssh/known_hosts'
remote.allowAnyHosts = true
remote.retryCount = 3
remote.retryWaitSec = 3
logLevel = 'FINER'
remote.port = 2299
pipeline {
agent none
environment {
HOME='.'
}
stages {
stage('Build') {
agent {
docker {
image 'node:10-alpine'
}
}
steps {
sh 'cd simon987/ && npm install'
sh 'cd simon987/ && npm audit fix'
sh 'cd simon987/ && npm run build'
sh 'mv simon987/dist webroot'
stash includes: 'webroot/', name: 'webdist'
}
}
stage('Deploy') {
agent none
steps {
node('master') {
unstash 'webdist'
sshCommand remote: remote, command: "cd simon987 && rm -rf webroot/* deploy.sh"
sshPut remote: remote, from: 'webroot/', into: 'simon987'
sshPut remote: remote, from: 'jenkins/deploy.sh', into: 'simon987/'
sshCommand remote: remote, command: 'chmod +x simon987/deploy.sh && ./simon987/deploy.sh'
}
}
}
}
}

View File

@ -1,6 +0,0 @@
#!/bin/bash
export TTROOT="simon987"
chmod 755 -R "${TTROOT}/webroot"

56
keybase/keybase.txt Normal file
View File

@ -0,0 +1,56 @@
==================================================================
https://keybase.io/hexcube
--------------------------------------------------------------------
I hereby claim:
* I am an admin of https://simon987.net
* I am hexcube (https://keybase.io/hexcube) on keybase.
* I have a public key ASD6lQ-L5IaMQazQFkmsjb79YSnnfy0-ajuCknBNcd9h2Ao
To do so, I am signing this object:
{
"body": {
"key": {
"eldest_kid": "01204253a32d175aee0bf3146ce22c3fb82ce3fbad51a3730077b323b67b0d9637b30a",
"host": "keybase.io",
"kid": "0120fa950f8be4868c41acd01649ac8dbefd6129e77f2d3e6a3b8292704d71df61d80a",
"uid": "924ad3d3adea6574298bfb48661d0319",
"username": "hexcube"
},
"merkle_root": {
"ctime": 1606929502,
"hash": "657ac1cbd3cb80b8a491f8a5917320cc45acfb3aef7160b145ccb62320a1ae546f3532e514908ac0cf9b36ffb64ee569b6e2c7f2b8f894cf90b4018d9ca50dd8",
"hash_meta": "c1ec196872910e19eacdd0a5d4d8596479940c187ac9bd5782953e6ee7ce8922",
"seqno": 18290718
},
"service": {
"entropy": "FUlB32rJkgQCYq7VuXGq/2g8",
"hostname": "simon987.net",
"protocol": "https:"
},
"type": "web_service_binding",
"version": 2
},
"client": {
"name": "keybase.io go client",
"version": "5.5.1"
},
"ctime": 1606929522,
"expire_in": 504576000,
"prev": "0d60eeb2ac76d442d7720dcc73caddf0457f4d74c7a4cec2d8ff78ba2981683c",
"seqno": 19,
"tag": "signature"
}
which yields the signature:
hKRib2R5hqhkZXRhY2hlZMOpaGFzaF90eXBlCqNrZXnEIwEg+pUPi+SGjEGs0BZJrI2+/WEp538tPmo7gpJwTXHfYdgKp3BheWxvYWTESpcCE8QgDWDusqx21ELXcg3Mc8rd8EV/TXTHpM7C2P94uimBaDzEIHEeaUjECFkr8z7I/kPhWwt6FxYbcpIoDW/2xVJ8rNCNAgHCo3NpZ8RAGyYWcwaoFsEbeQOQn5z7cwO+7ILQVbbBq2QW1X0VDVE/1Oj624m23U38NlbqaQlRJXh5Qw/aubnu2Yz1RX8HBahzaWdfdHlwZSCkaGFzaIKkdHlwZQildmFsdWXEILl6oyX4zu/vhDuPrPC7WbRunBNMFwxDpUyquB+Ey4Mno3RhZ80CAqd2ZXJzaW9uAQ==
And finally, I am proving ownership of this host by posting or
appending to this document.
View my publicly-auditable identity here: https://keybase.io/hexcube
==================================================================

44
nginx.conf Normal file
View File

@ -0,0 +1,44 @@
user nginx;
worker_processes auto;
error_log /dev/stderr warn;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/stdout main;
sendfile on;
keepalive_timeout 5;
server {
listen 80 default_server;
location / {
root /www/;
}
location /ip {
add_header Content-Type text/plain;
return 200 $http_x_forwarded_for;
}
location /gpg {
index gpg.txt;
alias /www/gpg;
}
location = /keybase.txt {
alias /www/keybase/keybase.txt;
}
}
}