From 1cb011c54c633820d175efc76607ef2a12f7a522 Mon Sep 17 00:00:00 2001 From: Sleeyax Date: Wed, 7 Feb 2024 10:50:04 +0100 Subject: [PATCH] Add docker image (#4) --- Dockerfile | 17 +++++++++++++++++ README.md | 10 ++++++++++ 2 files changed, 27 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..10e85ab --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM node:lts-alpine as builder + +WORKDIR /app + +COPY package*.json /app +RUN npm install + +COPY . . +RUN npm run build + +FROM nginx:stable-alpine as production-stage + +COPY --from=builder /app/dist /usr/share/nginx/html + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] diff --git a/README.md b/README.md index a40972a..9631826 100644 --- a/README.md +++ b/README.md @@ -29,5 +29,15 @@ npm run dev npm run build ``` +## Docker +Run the following commands to build and run the app in a Docker container: + +```bash +$ docker build -t stremio-addon-manager . +$ docker run -p 8080:80 stremio-addon-manager +``` + +The app will be accessible at `http://localhost:8080`. + ## Thanks Big thank you to `Sleeyax` and `` for the conversations and code snippets that made this really easy to implement.