mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
(nextjs) separate Dockerfile for nextjs
This commit is contained in:
parent
d4d200f6ef
commit
01c2b163b2
3 changed files with 19 additions and 6 deletions
10
.drone.yml
10
.drone.yml
|
@ -38,13 +38,13 @@ steps:
|
||||||
branch:
|
branch:
|
||||||
- develop
|
- develop
|
||||||
environment:
|
environment:
|
||||||
REACT_APP_API_HOST: https://pig.staging.vault48.org/
|
NEXT_PUBLIC_API_HOST: https://pig.staging.vault48.org/
|
||||||
REACT_APP_REMOTE_CURRENT: https://pig.staging.vault48.org/static/
|
NEXT_PUBLIC_REMOTE_CURRENT: https://pig.staging.vault48.org/static/
|
||||||
settings:
|
settings:
|
||||||
dockerfile: docker/www/Dockerfile
|
dockerfile: docker/nextjs/Dockerfile
|
||||||
build_args_from_env:
|
build_args_from_env:
|
||||||
- REACT_APP_API_HOST
|
- NEXT_PUBLIC_API_HOST
|
||||||
- REACT_APP_REMOTE_CURRENT
|
- NEXT_PUBLIC_REMOTE_CURRENT
|
||||||
tag:
|
tag:
|
||||||
- ${DRONE_BRANCH}
|
- ${DRONE_BRANCH}
|
||||||
custom_labels:
|
custom_labels:
|
||||||
|
|
11
docker/nextjs/Dockerfile
Normal file
11
docker/nextjs/Dockerfile
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
FROM node:14-alpine as builder
|
||||||
|
COPY package.json yarn.lock ./
|
||||||
|
RUN yarn
|
||||||
|
COPY . .
|
||||||
|
ARG NEXT_PUBLIC_API_HOST
|
||||||
|
ARG NEXT_PUBLIC_REMOTE_CURRENT
|
||||||
|
ENV NEXT_PUBLIC_API_HOST $NEXT_PUBLIC_API_HOST
|
||||||
|
ENV NEXT_PUBLIC_REMOTE_CURRENT $NEXT_PUBLIC_REMOTE_CURRENT
|
||||||
|
RUN yarn next:build
|
||||||
|
|
||||||
|
ENTRYPOINT ["yarn", "nginx:start"]
|
|
@ -54,7 +54,9 @@
|
||||||
"build": "craco build",
|
"build": "craco build",
|
||||||
"ts-check": "tsc -p tsconfig.json --noEmit",
|
"ts-check": "tsc -p tsconfig.json --noEmit",
|
||||||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
|
||||||
"prepare": "husky install"
|
"prepare": "husky install",
|
||||||
|
"next:build": "next build",
|
||||||
|
"next:start": "next start -p 80"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": [
|
"extends": [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue