From 971ffd0f1e87bbbc6cdc2b748ed8d3e0cee631d2 Mon Sep 17 00:00:00 2001 From: AbdelatifAitBara Date: Mon, 6 May 2024 11:21:08 +0200 Subject: [PATCH] Containerize the application --- Dockerfile | 7 +++++++ README.md | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c9f4c12 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM node:18-alpine +WORKDIR /app +COPY package*.json ./ +RUN npm ci +COPY . . +EXPOSE 9000 +CMD ["npx", "pocketbase-uml@latest"] \ No newline at end of file diff --git a/README.md b/README.md index 18b4e47..0eaf4e1 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,22 @@ You can access it online at [pocketbase-uml.github.io](https://pocketbase-uml.gi npx pocketbase-uml@latest ``` +You can build your Docker Image using our Dockerfile: + +1- First, you can build the image using this command: + +```sh +docker build -t pocket-app . +``` + +2- Run the Docker container: + +```sh +docker run -d -p :9000 pocket-app +``` + +3- Browse the application via: http://localhost:`ThePortThatYouHaveChosen` + Due to security browser restrictions, the online application can only access PocketBase databases through HTTPS. If you want to access a local PocketBase databases through HTTP, you can either run the application locally or use a service such as [ngrok](https://ngrok.com) to expose your local server to the Internet.