mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
fix(Dockerfile): allow base url in build
and explained in readme
This commit is contained in:
1 parent
e0ea7329ab
commit
1bcc0ace5e
2 files changed
+12
No files matched your search
@@ -8,10 +8,14 @@ WORKDIR /app
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN npm install -g pnpm && pnpm i --frozen-lockfile
|
||||
COPY . .
|
||||
ARG BASE_URL
|
||||
ENV BASE_URL=${BASE_URL}
|
||||
RUN pnpm build
|
||||
|
||||
# production stage
|
||||
FROM nginx:stable-alpine AS production-stage
|
||||
ARG BASE_URL
|
||||
ENV BASE_URL=${BASE_URL}
|
||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
||||
|
||||
@@ -10,6 +10,14 @@ You can use my image in your docker-compose file if you want an update to date v
|
||||
|
||||
Almost [all tools PR of it-tools](https://github.com/CorentinTh/it-tools/pulls).
|
||||
|
||||
## Build docker image for a subfolder
|
||||
|
||||
According to https://github.com/CorentinTh/it-tools/pull/461#issuecomment-1602506049:
|
||||
```
|
||||
docker build -t it-tools --build-arg BASE_URL="/my-folder/" .
|
||||
docker run -d --name it-tools --restart unless-stopped -p 8080:80 it-tools
|
||||
```
|
||||
|
||||
## Installation methods
|
||||
|
||||
| Docker Image | Local Installation |
|
||||
|
||||
Reference in new issue
Block a user