-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add docker workflow and update readme
- Loading branch information
Showing
8 changed files
with
64 additions
and
13 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
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
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,22 @@ | ||
FROM python:3.10-alpine | ||
|
||
ARG UNAME=archsim | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
ARG SHELL=sh | ||
|
||
RUN apk --update add nodejs-lts npm bash | ||
|
||
RUN addgroup -g ${GID} ${UNAME} | ||
RUN adduser -D -u ${UID} -G ${UNAME} -s /bin/${SHELL} ${UNAME} | ||
|
||
USER $UNAME | ||
|
||
WORKDIR /usr/src/app | ||
COPY --chown=${UNAME}:${UNAME} requirements-dev.txt ./ | ||
COPY --chown=${UNAME}:${UNAME} package.json ./ | ||
COPY --chown=${UNAME}:${UNAME} package-lock.json ./ | ||
RUN pip install -r requirements-dev.txt | ||
RUN npm install | ||
|
||
EXPOSE 4173 |
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
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 |
---|---|---|
@@ -1,8 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# exit on error | ||
set -e | ||
|
||
# build python package | ||
python -m build | ||
# ensure public folder is present and copy python package | ||
mkdir -p webgui/public/ | ||
cp dist/*.whl webgui/public/ | ||
# ensure js packages are available and run npm scripts | ||
npm install | ||
npm run $1 |
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,6 @@ | ||
#!/usr/bin/bash | ||
|
||
set -e | ||
|
||
docker build --build-arg UNAME=$(id -u -n) --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t archsim . | ||
docker run -it --rm --mount type=bind,source="$(pwd)",target=/usr/src/app/ -p 4173:4173 --user $(id -u):$(id -g) archsim ./build.sh preview-docker |
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
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