setup docker
This commit is contained in:
parent
803efaa69e
commit
d795f78bcc
2 changed files with 29 additions and 0 deletions
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
FROM node:lts AS runtime
|
||||||
|
WORKDIR /app
|
||||||
|
COPY package.json pnpm-lock.yaml ./
|
||||||
|
RUN npm install -g pnpm
|
||||||
|
RUN pnpm install --shamefully-hoist
|
||||||
|
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN apt-get update -y
|
||||||
|
RUN apt-get install -y jpegoptim
|
||||||
|
|
||||||
|
RUN wget https://github.com/shssoichiro/oxipng/releases/download/v9.1.3/oxipng_9.1.3-1_amd64.deb
|
||||||
|
RUN apt-get install -y ./oxipng_9.1.3-1_amd64.deb
|
||||||
|
RUN rm ./oxipng_9.1.3-1_amd64.deb
|
||||||
|
|
||||||
|
RUN pnpm run build
|
||||||
|
|
||||||
|
ENV HOST=0.0.0.0
|
||||||
|
ENV PORT=4321
|
||||||
|
EXPOSE 4321
|
||||||
|
CMD node ./dist/server/entry.mjs
|
7
compose.yml
Normal file
7
compose.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
services:
|
||||||
|
aria-coffee:
|
||||||
|
container_name: site
|
||||||
|
build: .
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 4321:4321
|
Loading…
Add table
Add a link
Reference in a new issue