Skip to content

Commit

Permalink
update dockerfile & dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ymuichiro committed Feb 12, 2024
1 parent bde3dbd commit caae4bf
Show file tree
Hide file tree
Showing 6 changed files with 3,131 additions and 2,503 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
node_modules/
.DS_Store
dist
dist-ssr
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Docker publish to ghcr.io

on:
push:
branches: ['main']
branches: ["main"]
pull_request:
branches: ['main']
branches: ["main"]
workflow_dispatch:

jobs:
Expand All @@ -13,10 +13,10 @@ jobs:
permissions:
packages: write
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
- uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
Expand Down
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
FROM node:20-alpine as build
FROM node:20-bookworm-slim as build

WORKDIR /app
COPY . /app

# BUILD sharp 向けに C# のコンパイラをインストールしてから npm 側の処理を開始する
RUN apk add --no-cache --update --repository http://dl-3.alpinelinux.org/alpine/edge/testing libtool automake autoconf nasm vips-dev fftw-dev gcc g++ make libc6-compat && \
npm ci && \
RUN npm ci && \
npm run build

RUN rm -rf src && rm package-lock.json

EXPOSE 3000

CMD [ "npm", "run", "start" ]
CMD ["node_modules/.bin/next", "start"]
Loading

0 comments on commit caae4bf

Please sign in to comment.