diff --git a/client/.dockerignore b/client/.dockerignore new file mode 100644 index 0000000..04c01ba --- /dev/null +++ b/client/.dockerignore @@ -0,0 +1,2 @@ +node_modules/ +dist/ \ No newline at end of file diff --git a/client/Dockerfile b/client/Dockerfile new file mode 100644 index 0000000..1a44d67 --- /dev/null +++ b/client/Dockerfile @@ -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/ + diff --git a/docker-compose_dev.yml b/docker-compose_dev.yml index 780b9be..93d4bf1 100644 --- a/docker-compose_dev.yml +++ b/docker-compose_dev.yml @@ -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