diff --git a/Dockerfile b/Dockerfile index 026834e..297baa8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ FROM node:23-alpine3.21 RUN apk upgrade --update-cache --available -LABEL version=0.0.1 description="BadgeDex" +ARG VERSION +LABEL version=${VERSION}} description="BadgeDex" +ENV APP_VERSION=${VERSION} # Create a group and user && Create directory for files RUN mkdir /app && addgroup -S badgedex && adduser -h /app -S badgedex -g "Badgedex User" -G badgedex && chown -R badgedex:badgedex /app && chmod -R 755 /app diff --git a/README.md b/README.md index e6410e5..f7abf8a 100644 --- a/README.md +++ b/README.md @@ -79,4 +79,17 @@ Az alábbi paraméterekkel szabályozhatod a `/tag` végpont működését: --- -A badge SVG formátumban tér vissza, így közvetlenül beilleszthető HTML-be vagy Markdown \ No newline at end of file +A badge SVG formátumban tér vissza, így közvetlenül beilleszthető HTML-be vagy Markdown + +# Installation + +## Run as Node.js application +Clone this repo and `npm start` + +## Run as Docker service + +`docker run -dit --name badgedex -p 3000:3000 badgedex` + +### Build for self hosted container service + +`docker build --build-arg VERSION=$(cat VERSION) -t badgedex:$(cat VERSION) .` \ No newline at end of file diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..8a9ecc2 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.0.1 \ No newline at end of file