mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 12:26:40 +07:00
This commit is contained in:
parent
f083b488ba
commit
db453a86c6
6 changed files with 57 additions and 4 deletions
|
@ -2,6 +2,8 @@
|
|||
node_modules
|
||||
out
|
||||
dist
|
||||
.husky
|
||||
.next
|
||||
.idea
|
||||
.history
|
||||
.vscode
|
||||
|
|
|
@ -11,7 +11,7 @@ steps:
|
|||
image: plugins/docker
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- never
|
||||
environment:
|
||||
NEXT_PUBLIC_API_HOST: https://vault48.org/api/
|
||||
NEXT_PUBLIC_REMOTE_CURRENT: https://vault48.org/static/
|
||||
|
|
49
docker/nextjs-standalone/Dockerfile
Normal file
49
docker/nextjs-standalone/Dockerfile
Normal file
|
@ -0,0 +1,49 @@
|
|||
|
||||
# Base ───────────────────────────────────────────────────────────────────────
|
||||
FROM node:14-alpine as base
|
||||
|
||||
WORKDIR /opt/app
|
||||
|
||||
ENV PATH /opt/app/node_modules/.bin:$PATH
|
||||
|
||||
# Build ──────────────────────────────────────────────────────────────────────
|
||||
FROM base as builder
|
||||
|
||||
ARG NEXT_PUBLIC_API_HOST
|
||||
ARG NEXT_PUBLIC_REMOTE_CURRENT
|
||||
ARG NEXT_PUBLIC_PUBLIC_HOST
|
||||
ARG NEXT_PUBLIC_BOT_USERNAME
|
||||
|
||||
ENV NEXT_PUBLIC_API_HOST $NEXT_PUBLIC_API_HOST
|
||||
ENV NEXT_PUBLIC_REMOTE_CURRENT $NEXT_PUBLIC_REMOTE_CURRENT
|
||||
ENV NEXT_PUBLIC_PUBLIC_HOST $NEXT_PUBLIC_PUBLIC_HOST
|
||||
ENV NEXT_PUBLIC_BOT_USERNAME $NEXT_PUBLIC_BOT_USERNAME
|
||||
|
||||
# ENV NEXT_PUBLIC_API_HOST https://vault48.org/api/
|
||||
# ENV NEXT_PUBLIC_REMOTE_CURRENT https://vault48.org/static/
|
||||
# ENV NEXT_PUBLIC_PUBLIC_HOST https://vault48.org/
|
||||
# ENV NEXT_PUBLIC_BOT_USERNAME vault48bot
|
||||
|
||||
COPY package.json .
|
||||
COPY yarn.lock .
|
||||
|
||||
RUN true \
|
||||
&& yarn install --frozen-lockfile\
|
||||
&& true
|
||||
|
||||
COPY . /opt/app
|
||||
|
||||
# pkg packs nodejs with given script, so we don't need it in next section
|
||||
RUN yarn next build
|
||||
|
||||
FROM node:14-alpine as runner
|
||||
|
||||
WORKDIR /opt/app
|
||||
|
||||
COPY --from=builder /opt/app/public ./public
|
||||
COPY --from=builder /opt/app/.next/standalone .
|
||||
COPY --from=builder /opt/app/.next/static ./.next/static
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT ["node", "server.js"]
|
|
@ -9,6 +9,7 @@ const withTM = require('next-transpile-modules')([
|
|||
|
||||
module.exports = withBundleAnalyzer(
|
||||
withTM({
|
||||
output: 'standalone',
|
||||
/** rewrite old-style node paths */
|
||||
async rewrites() {
|
||||
return [
|
||||
|
|
|
@ -58,6 +58,7 @@ const PhotoSwipe = observer(({ index, items }: Props) => {
|
|||
|
||||
return () => {
|
||||
pswp.current?.off('close', hideModal);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
pswp.current?.destroy();
|
||||
};
|
||||
}, [hideModal, items, index, isTablet]);
|
||||
|
|
|
@ -803,9 +803,9 @@ callsites@^3.0.0:
|
|||
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
|
||||
|
||||
caniuse-lite@^1.0.30001332:
|
||||
version "1.0.30001564"
|
||||
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001564.tgz"
|
||||
integrity sha512-DqAOf+rhof+6GVx1y+xzbFPeOumfQnhYzVnZD6LAXijR77yPtm9mfOcqOnT3mpnJiZVT+kwLAFnRlZcIz+c6bg==
|
||||
version "1.0.30001707"
|
||||
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001707.tgz"
|
||||
integrity sha512-3qtRjw/HQSMlDWf+X79N206fepf4SOOU6SQLMaq/0KkZLmSjPxAkBOQQ+FxbHKfHmYLZFfdWsO3KA90ceHPSnw==
|
||||
|
||||
chalk@^2.0.0:
|
||||
version "2.4.2"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue