forked from TWS/kalkutago
Build custom image for client dev server
This commit is contained in:
parent
e33ce8b1a8
commit
cdb01b26ce
2
client/.dockerignore
Normal file
2
client/.dockerignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
node_modules/
|
||||
dist/
|
10
client/Dockerfile
Normal file
10
client/Dockerfile
Normal file
|
@ -0,0 +1,10 @@
|
|||
FROM node
|
||||
# user node has UID 1000 in the container
|
||||
USER node
|
||||
EXPOSE 5173
|
||||
VOLUME /client
|
||||
WORKDIR /client
|
||||
ADD package.json yarn.lock tsconfig.json tsconfig.node.json vite.config.ts /client/
|
||||
RUN yarn
|
||||
ADD public/ src/ index.html /client/
|
||||
|
|
@ -37,11 +37,9 @@ services:
|
|||
- ./db.mount:/var/lib/postgresql/data
|
||||
|
||||
client_devserver:
|
||||
image: node
|
||||
build: ./client
|
||||
volumes: [ ./client:/client/ ]
|
||||
working_dir: /client
|
||||
command: [ "sh", "-c", "yarn && yarn dev --host 0.0.0.0" ]
|
||||
expose: [ 5173 ]
|
||||
command: "yarn dev --host 0.0.0.0"
|
||||
networks: [ web ]
|
||||
labels:
|
||||
traefik.enable: true
|
||||
|
|
Loading…
Reference in a new issue