mirror of
https://github.com/exzork/gc-tools.git
synced 2024-11-23 16:17:50 +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
|
FROM node:18-alpine as builder
|
||||||
ADD . /gc_tools
|
WORKDIR /app
|
||||||
WORKDIR /gc_tools
|
COPY package.json package.json
|
||||||
RUN ["yarn", "install"]
|
COPY yarn.lock yarn.lock
|
||||||
RUN ["yarn", "run", "build"]
|
RUN yarn install --production
|
||||||
CMD ["yarn","global","add","serve"]
|
COPY . .
|
||||||
CMD ["serve", "-s", "build"]
|
RUN yarn build
|
||||||
EXPOSE 3000
|
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:
|
services:
|
||||||
gc_tools:
|
gc_tools:
|
||||||
container_name: gc_tools
|
container_name: gc_tools
|
||||||
command: yarn start
|
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
volumes:
|
|
||||||
- .:/gc_tools
|
|
||||||
- /gc_tools/node_modules
|
|
||||||
- /gc_tools/build
|
|
||||||
environment:
|
environment:
|
||||||
- VIRTUAL_HOST=gc-tools.exzork.me
|
- VIRTUAL_HOST=gc-tools.exzork.me
|
||||||
- LETSENCRYPT_HOST=gc-tools.exzork.me
|
- LETSENCRYPT_HOST=gc-tools.exzork.me
|
||||||
|
Loading…
Reference in New Issue
Block a user