Merge pull request #6 from gractwo/dzioba-dev

Jebać gractwo
This commit is contained in:
Stanisław Dzioba
2022-06-20 22:17:37 +02:00
committed by GitHub
3 changed files with 10 additions and 5 deletions

View File

@@ -11,7 +11,11 @@ jobs:
build: build:
runs-on: self-hosted runs-on: self-hosted
steps: steps:
- name: Deploy - uses: actions/checkout@v3
- name: Build image
run: docker build -t ${{ github.repository }} .
- name: Deploy image
run: | run: |
npm install docker stop ${{ github.event.repository.name }} || true
npm run build docker rm ${{ github.event.repository.name }} || true
docker run -d -e ${{ github.repository }} -p 3000:3000

View File

@@ -1,5 +1,6 @@
FROM node:16.10.0 FROM node:16.10.0
WORKDIR /app WORKDIR /app
COPY ./ ./ COPY ./ ./
RUN npm install CMD ["npm","install"]
CMD ["npm", "run", "build"] CMD ["npx","next","build"]
CMD ["npx","next","start"]

View File