mirror of
https://github.com/logos-messaging/logos-messaging-frontend.git
synced 2026-01-02 13:53:13 +00:00
feat: pre-build artefact and dockerize (#7)
feat: pre-build artefact and dockerize
This commit is contained in:
commit
6b298ba0c7
16
.github/workflows/push.yml
vendored
16
.github/workflows/push.yml
vendored
@ -11,17 +11,29 @@ jobs:
|
||||
steps:
|
||||
- id: commit
|
||||
uses: pr-mpt/actions-commit-hash@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
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
|
||||
with:
|
||||
push: true
|
||||
|
||||
12
Dockerfile
12
Dockerfile
@ -1,8 +1,4 @@
|
||||
FROM node:18
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
EXPOSE 3000
|
||||
CMD ["npm", "run", "serve"]
|
||||
FROM httpd:2.4
|
||||
RUN mkdir -p /usr/local/apache2/htdocs/_next
|
||||
COPY ./out/* /usr/local/apache2/htdocs/
|
||||
COPY ./out/_next /usr/local/apache2/htdocs/_next
|
||||
|
||||
@ -27,6 +27,7 @@ npm run serve
|
||||
## To run in docker
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
docker build -t 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",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"serve": "serve ./out"
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@waku/rln": "0.1.1-7e8cb89",
|
||||
@ -29,7 +28,6 @@
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "13.5.6",
|
||||
"postcss": "^8",
|
||||
"serve": "^14.2.1",
|
||||
"tailwindcss": "^3",
|
||||
"typescript": "^5"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user