Merge pull request 'create-docker' (#2) from create-docker into develop
Some checks failed
Gitea Actions Demo / check (push) Failing after 3s
Some checks failed
Gitea Actions Demo / check (push) Failing after 3s
Reviewed-on: #2
This commit is contained in:
commit
2e8f6329b5
21
.gitea/workflows/test-self.yaml
Normal file
21
.gitea/workflows/test-self.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
name: Gitea Actions Demo
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [develop]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: self-hosted
|
||||
defaults:
|
||||
run:
|
||||
working-directory: /home/raysam/act-runner-host/repo
|
||||
steps:
|
||||
- run: git --version
|
||||
- run: rm -rf fuware-fe
|
||||
- run: git clone ssh://git@thamluu.synology.me:222/sam/fuware-fe.git fuware-fe
|
||||
- name: run docker
|
||||
working-directory: /home/raysam/act-runner-host/repo/fuware-fe
|
||||
run: docker compose up --build -d
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
16
Dockerfile
16
Dockerfile
@ -1,14 +1,18 @@
|
||||
FROM node:18.19.0-alpine3.19
|
||||
FROM node:18.20.4-alpine3.20
|
||||
|
||||
WORKDIR /app/client
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install -g pnpm
|
||||
COPY package*.json .
|
||||
RUN npm i
|
||||
COPY pnpm-lock.yaml .
|
||||
RUN pnpm install --prefer-offline=true --frozen-lockfile=true
|
||||
RUN npm i -g serve
|
||||
|
||||
COPY . .
|
||||
ENV NODE_ENV=production
|
||||
ENV VITE_LOGIN_KEY=7fo24CMyIc
|
||||
|
||||
EXPOSE 5000
|
||||
RUN pnpm build
|
||||
|
||||
CMD ["npm", "run", "dev"]
|
||||
EXPOSE 3000
|
||||
|
||||
CMD [ "serve", "-s", "dist" ]
|
||||
|
13
docker-compose.yml
Normal file
13
docker-compose.yml
Normal file
@ -0,0 +1,13 @@
|
||||
services:
|
||||
fuware:
|
||||
container_name: fuware-fe
|
||||
image: fuware-fe
|
||||
build:
|
||||
context: ../
|
||||
target: production
|
||||
dockerfile: ./Dockerfile
|
||||
restart: always
|
||||
ports:
|
||||
- 16001:3000
|
||||
environment:
|
||||
NODE_ENV: 'production'
|
@ -24,7 +24,7 @@ export default function Home() {
|
||||
const first = getFirstItem(NAV_ITEM(t, auth?.userInfo?.isAdmin))
|
||||
navigate(first ? first.pathName : PathConstants.PROFILE)
|
||||
}
|
||||
}, [auth.userInfo.isAdmin])
|
||||
}, [auth.userInfo?.isAdmin])
|
||||
|
||||
return <></>
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user