Skip to content

Commit

Permalink
improve serving via docker, update version, make serve-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
soad003 committed Jan 10, 2024
1 parent e6c8911 commit fc0e475
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ LABEL org.opencontainers.image.url="https://www.ikna.io/"
LABEL org.opencontainers.image.description="GraphSense's Web GUI for interactive cryptocurrency analysis written"
LABEL org.opencontainers.image.source="https://github.com/graphsense/graphsense-dashboard"

ENV DOCKER_USER=user
ENV DOCKER_USER=dockeruser
# override to get
ENV REST_URL=http://localhost:9000
ARG DOCKER_UID=1000

RUN addgroup -S $DOCKER_USER && adduser -S $DOCKER_USER -G $DOCKER_USER -u $DOCKER_UID
Expand Down Expand Up @@ -38,11 +40,13 @@ COPY ./generate.js $WORKDIR/generate.js
RUN chown -R $DOCKER_USER $WORKDIR && \
mkdir -p /usr/share/nginx/html /run/nginx && \
chown -R $DOCKER_USER /usr/share/nginx/html && \
chown -R $DOCKER_USER /var/lib/nginx && \
chown -R $DOCKER_USER /var/log/nginx && \
rm -f /etc/nginx/http.d/default.conf

USER $DOCKER_USER
RUN npm install

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]
EXPOSE 8000
CMD ["nginx", "-g", "pid /tmp/nginx.pid;daemon off;"]
EXPOSE 8000
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ build:
npm run build

build-docker:
docker build .
docker build . -t graphsense-dashboard

serve-docker: build-docker
docker run -it --network='host' -e REST_URL=http://localhost:9000 localhost/graphsense-dashboard:latest

format:
npx elm-format --yes src

.PHONY: openapi serve test format
.PHONY: openapi serve test format build build-docker serve-docker
3 changes: 2 additions & 1 deletion docker/site.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ server {
location = / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files /index.html;
try_files /index.html /dev/null =404;
}

location / {
root /usr/share/nginx/html;
Expand Down
2 changes: 1 addition & 1 deletion src/Version.elm
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ module Version exposing (version)

version : String
version =
"23.12"
"24.01.0"

0 comments on commit fc0e475

Please sign in to comment.