Skip to content

Commit

Permalink
Try build with NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiash98 committed Feb 21, 2024
1 parent 18534a5 commit 58d7c78
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5,292 deletions.
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["usernamehw.errorlens"]
}
10 changes: 5 additions & 5 deletions Dockerfile.blifrivillig
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ COPY . .

RUN apk add --no-cache libc6-compat

RUN yarn global add turbo
RUN yarn prune:blifrivillig
RUN npm install --global turbo
RUN npm run prune:blifrivillig

FROM node:lts-alpine AS Builder

Expand All @@ -28,16 +28,16 @@ ARG STUDENTBERGEN_TOKEN
ARG CRESCAT_TOKEN
ARG INVALIDATE_SECRET

RUN yarn install --silent --frozen-lockfile
RUN npm install

RUN yarn postbuild
RUN npm run postbuild

FROM node:lts-alpine AS Runner
WORKDIR /app

ENV NODE_ENV production

COPY --from=Builder /app/package.json /app/yarn.lock ./
COPY --from=Builder /app/package.json /app/package-lock.json ./
COPY --from=Builder /app/node_modules ./node_modules
COPY --from=Builder /app/apps/blifrivillig/package.json ./apps/blifrivillig/package.json
COPY --from=Builder /app/apps/blifrivillig/public ./apps/blifrivillig/public
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile.kvarteret
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ COPY . .

RUN apk add --no-cache libc6-compat

RUN yarn global add turbo
RUN yarn prune:kvarteret
RUN npm install --global turbo
RUN npm run prune:kvarteret

FROM node:lts-alpine AS Builder
WORKDIR /app
Expand All @@ -27,14 +27,14 @@ ARG STUDENTBERGEN_TOKEN
ARG CRESCAT_TOKEN
ARG INVALIDATE_SECRET

RUN yarn install --silent --frozen-lockfile
RUN npm install

RUN yarn postbuild
RUN npm run postbuild

FROM node:lts-alpine AS Runner
WORKDIR /app

COPY --from=Builder /app/package.json /app/yarn.lock ./
COPY --from=Builder /app/package.json /app/package-lock.json ./
COPY --from=Builder /app/node_modules ./node_modules
COPY --from=Builder /app/apps/kvarteret/package.json ./apps/kvarteret/package.json
COPY --from=Builder /app/apps/kvarteret/public ./apps/kvarteret/public
Expand Down
34 changes: 10 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,21 @@ First, run the development server:

1. Install nodejs

This will vary depending on your system. Here are a few common systems:
This will vary depending on your system. Here are a few common systems:

Ubuntu: ```sudo apt-get install nodejs```

Fedora ```sudo dnf install nodejs```
Ubuntu: `sudo apt-get install nodejs`

windows: [Download link](https://nodejs.org/dist/v16.15.0/node-v16.15.0-x86.msi)
Fedora `sudo dnf install nodejs`

MacOS: [Download link](https://nodejs.org/dist/v16.15.0/node-v16.15.0.pkg)
windows: [Download link](https://nodejs.org/)

2. Install yarn
MacOS: `brew install node`

This installs yarn globally

```sh
npm i -g yarn
```

3. Add secret token in each app-folder
2. Add secret token in each app-folder

(you get sometoken from someone in the E-service)
from root-folder:

```sh
cd apps/kvarteret.no

Expand All @@ -37,6 +30,7 @@ cd apps/kvarteret.no
```

and:

```sh
cd apps/blifrivillig.no

Expand All @@ -45,7 +39,7 @@ cd apps/blifrivillig.no
## save the file
```

4. Run the localhost server
3. Run the localhost server

Be in the root-folder of the repo and run:

Expand All @@ -57,11 +51,9 @@ followed by:

```bash
npm run dev
# or
yarn dev
```

5. (Optional)
4. (Optional)

You might get an error from just the above command. if so, this might help:

Expand Down Expand Up @@ -89,9 +81,3 @@ To learn more about Next.js, take a look at the following resources:
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Loading

0 comments on commit 58d7c78

Please sign in to comment.