mirror of
https://github.com/exzork/gc-tools.git
synced 2024-11-23 08:11:01 +00:00
fix docker thing
This commit is contained in:
parent
83c55f0d31
commit
afc674592b
20
Dockerfile
20
Dockerfile
@ -1,8 +1,12 @@
|
||||
FROM node:18-slim
|
||||
ADD . /gc_tools
|
||||
WORKDIR /gc_tools
|
||||
RUN ["yarn", "install"]
|
||||
RUN ["yarn", "run", "build"]
|
||||
CMD ["yarn","global","add","serve"]
|
||||
CMD ["serve", "-s", "build"]
|
||||
EXPOSE 3000
|
||||
FROM node:18-alpine as builder
|
||||
WORKDIR /app
|
||||
COPY package.json package.json
|
||||
COPY yarn.lock yarn.lock
|
||||
RUN yarn install --production
|
||||
COPY . .
|
||||
RUN yarn build
|
||||
FROM nginx:alpine
|
||||
WORKDIR /usr/share/nginx/html
|
||||
RUN rm -rf *
|
||||
COPY --from=builder /app/build .
|
||||
ENTRYPOINT ["nginx","-g","daemon off;"]
|
@ -2,14 +2,9 @@ version: '3.8'
|
||||
services:
|
||||
gc_tools:
|
||||
container_name: gc_tools
|
||||
command: yarn start
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
volumes:
|
||||
- .:/gc_tools
|
||||
- /gc_tools/node_modules
|
||||
- /gc_tools/build
|
||||
environment:
|
||||
- VIRTUAL_HOST=gc-tools.exzork.me
|
||||
- LETSENCRYPT_HOST=gc-tools.exzork.me
|
||||
|
Loading…
Reference in New Issue
Block a user