-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM node:lts-alpine | ||
|
||
WORKDIR /app | ||
COPY package*.json . | ||
|
||
RUN adduser --gecos '' --disabled-password rpv \ | ||
&& chown -R rpv:rpv /app \ | ||
&& su rpv -c "npm install" \ | ||
&& su rpv -c "npm install http-server" | ||
|
||
COPY . . | ||
|
||
RUN chown -R rpv:rpv /app \ | ||
&& su rpv -c "npm run build" | ||
|
||
USER rpv:rpv | ||
EXPOSE 5173 | ||
|
||
CMD ["npm", "run", "dev", "--", "--host"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
podman image exists rpv-web-dev | ||
|
||
if [ $? -ne 0 ]; then | ||
echo '[+] Building rpv-web-dev image.' | ||
podman build -t rpv-web-dev -f Dockerfile.dev . | ||
else | ||
echo '[+] rpv-web-dev image already exists.' | ||
fi | ||
|
||
echo '[+] Starting rpv-web-dev container.' | ||
podman run -v ${PWD}/src/:/app/src:Z -it -p 5173:5173 rpv-web-dev |