From eabae0db985e9e86233e825cb6e3a0403b52d841 Mon Sep 17 00:00:00 2001 From: Andrey Gaag Date: Thu, 16 Dec 2021 18:01:51 +0500 Subject: [PATCH 1/2] Add Dockerfile for debug run --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..cba0fdc0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM node:17-alpine3.12 +COPY . /usr/src/app +WORKDIR /usr/src/app +RUN npm install +RUN npm run dev \ No newline at end of file From b188ffddffda859e95f20623a408d008facb0452 Mon Sep 17 00:00:00 2001 From: Andrey Gaag Date: Thu, 16 Dec 2021 22:44:05 +0500 Subject: [PATCH 2/2] Add docker compose support --- Dockerfile | 3 +-- README.md | 7 +++++++ docker-compose.yml | 11 +++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index cba0fdc0..b2ecd841 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ FROM node:17-alpine3.12 COPY . /usr/src/app WORKDIR /usr/src/app -RUN npm install -RUN npm run dev \ No newline at end of file +RUN npm install \ No newline at end of file diff --git a/README.md b/README.md index 00597e16..7324ece2 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,13 @@ npm install npm run start ``` +or + +``` +export DOCKER_DEFAULT_PLATFORM=linux/amd64 # Only for M1 chips +docker compose up +``` + Then head to `localhost:3000` in your browser. ### Remixing and Forking diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..ba84ecb4 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + moonrider: + build: . + ports: + - "3000:3000" + volumes: + - .:/app + command: npm run start + environment: + - NODE_OPTIONS=--openssl-legacy-provider \ No newline at end of file