diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 00000000..cc1fa4c8 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,9 @@ +FROM node:19-buster-slim +WORKDIR /iris-messenger/ +ENV NODE_OPTIONS=--openssl-legacy-provider +RUN apt-get update && apt-get install -y python3 build-essential + +COPY package.json yarn.lock ./ +RUN yarn + +CMD [ "yarn", "dev" ] \ No newline at end of file diff --git a/README.md b/README.md index 5e72afa8..15a0f992 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,8 @@ npm run test [iris.to](https://iris.to) production version is in the [stable](https://github.com/irislib/iris-messenger/tree/stable) branch. +Alternatively, you can run the dev environment on Docker: `docker-compose up`. The dev build with autoreload will be available at http://localhost:8080. + ### Tauri (desktop app) [Tauri docs](https://tauri.app/v1/guides/) diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..ef71f31a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.8' + +services: + iris-messenger: + build: + context: . + dockerfile: Dockerfile.dev + volumes: + - .:/iris-messenger + ports: + - 8080:8080