Skip to content

Commit

Permalink
Merge pull request #76 from gandlafbtc/version-0.1.10
Browse files Browse the repository at this point in the history
Version 0.1.10
  • Loading branch information
gandlafbtc authored Apr 18, 2023
2 parents f8aa234 + 9638a49 commit 5b5edb0
Show file tree
Hide file tree
Showing 22 changed files with 627 additions and 710 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ node_modules
.env
.env.*
!.env.example
/http/*.min.js

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
Expand Down
29 changes: 17 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
FROM node:current-alpine
FROM node:alpine as build
WORKDIR /nutstash
COPY . .
COPY ./http/app.html ./src/app.html
COPY ./http/svelte.config.js ./svelte.config.js
COPY ./http/asmcrypto.all.es5.min.js ./static/asmcrypto.all.es5.min.js
COPY ./http/webcrypto-liner.shim.min.js ./static/webcrypto-liner.shim.min.js

COPY --chown=1000:1000 . /app
RUN npm i
RUN npm run build

RUN cd /app \
&& npm install \
&& npm run build
FROM node:alpine as prod
COPY ./package*.json ./
RUN npm ci --production --silent --ignore-scripts
COPY --from=build /nutstash/build ./build
COPY --from=build /nutstash/docker-startup.sh ./build

LABEL org.opencontainers.image.source https://github.com/gandlafbtc/nutstash-wallet

WORKDIR /app

EXPOSE 4173/tcp

CMD [ "npm", "run", "preview", "--", "--host" ]
EXPOSE 3000/tcp
USER node
CMD [ "/bin/sh", "build/docker-startup.sh" ]
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
platforms:
- 'linux/amd64'
- 'linux/arm64'
user: '1000:1000'
user: '1000:node'
restart: on-failure
ports:
- '4173:4173'
- '3000:3000'
2 changes: 2 additions & 0 deletions docker-startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
node ./build/
18 changes: 18 additions & 0 deletions http/app.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<link rel="manifest" href="/manifest.json" />
<link rel="apple-touch-icon" href="/maskable_icon_x192.png" />
<meta name="theme-color" content="#212121" />
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.ico" />
<meta name="viewport" content="width=device-width" />
<script src="asmcrypto.all.es5.min.js"></script>
<script src="webcrypto-liner.shim.min.js"></script>

%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
1 change: 1 addition & 0 deletions http/asmcrypto.all.es5.min.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions http/svelte.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/kit/vite';

/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),

kit: {
adapter: adapter()
}
};

export default config;
1 change: 1 addition & 0 deletions http/webcrypto-liner.shim.min.js

Large diffs are not rendered by default.

Loading

1 comment on commit 5b5edb0

@vercel
Copy link

@vercel vercel bot commented on 5b5edb0 Apr 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.