mirror of
https://github.com/logos-messaging/logos-messaging-frontend.git
synced 2026-01-05 23:33:07 +00:00
pre-build artefact and docerize
This commit is contained in:
parent
e739e5f96d
commit
fb2ceb6f7d
16
.github/workflows/push.yml
vendored
16
.github/workflows/push.yml
vendored
@ -11,17 +11,29 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- id: commit
|
- id: commit
|
||||||
uses: pr-mpt/actions-commit-hash@v2
|
uses: pr-mpt/actions-commit-hash@v2
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
-
|
|
||||||
name: Build and push
|
- name: Setup node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
|
||||||
|
- name: Setup npm
|
||||||
|
uses: bahmutov/npm-install@v1
|
||||||
|
|
||||||
|
- name: Artefact build
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
|
|||||||
10
Dockerfile
10
Dockerfile
@ -1,8 +1,8 @@
|
|||||||
FROM node:18
|
FROM node:18
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
RUN npm i -g serve
|
||||||
RUN npm ci
|
RUN mkdir -p ./_next
|
||||||
COPY . .
|
COPY ./out/* ./
|
||||||
RUN npm run build
|
COPY ./out/_next ./_next
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["npm", "run", "serve"]
|
CMD ["npx", "serve", "./"]
|
||||||
|
|||||||
@ -27,6 +27,7 @@ npm run serve
|
|||||||
## To run in docker
|
## To run in docker
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
npm run build
|
||||||
docker build -t waku_frontend .
|
docker build -t waku_frontend .
|
||||||
docker run -d -p 300:3000 waku_frontend
|
docker run -d -p 300:3000 waku_frontend
|
||||||
```
|
```
|
||||||
|
|||||||
1643
package-lock.json
generated
1643
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -6,8 +6,7 @@
|
|||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint",
|
"lint": "next lint"
|
||||||
"serve": "serve ./out"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@waku/rln": "0.1.1-7e8cb89",
|
"@waku/rln": "0.1.1-7e8cb89",
|
||||||
@ -29,7 +28,6 @@
|
|||||||
"eslint": "^8",
|
"eslint": "^8",
|
||||||
"eslint-config-next": "13.5.6",
|
"eslint-config-next": "13.5.6",
|
||||||
"postcss": "^8",
|
"postcss": "^8",
|
||||||
"serve": "^14.2.1",
|
|
||||||
"tailwindcss": "^3",
|
"tailwindcss": "^3",
|
||||||
"typescript": "^5"
|
"typescript": "^5"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user