Skip to content

Commit

Permalink
Merge pull request #30 from VIDA-NYU/docker-docs
Browse files Browse the repository at this point in the history
Host docs in docker container
  • Loading branch information
soniacq authored Jan 13, 2023
2 parents 2e6293c + 1c310de commit 0779fec
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**/.env
volumes
docs
# docs
frontend/node_modules
frontend/build
lib_geo/data
Expand Down
14 changes: 14 additions & 0 deletions Dockerfile.docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM sphinxdoc/sphinx AS build

WORKDIR /src

RUN pip install sphinx_rtd_theme

ADD docs ./docs
RUN cd docs && make html

FROM nginx:stable-alpine
COPY --from=build /src/docs/build/html /usr/share/nginx/html
#ADD ./docs/build/html /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
18 changes: 18 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ services:
- "traefik.http.routers.tim-dash.tls.certresolver=le"
- "traefik.http.routers.tim-dash.tls=true"
- "traefik.http.services.tim-dash.loadbalancer.server.port=80"
docs:
container_name: dashdocs
restart: always
ports:
- "8034:80"
networks:
- web
- default
build:
context: .
dockerfile: ./Dockerfile.docs
labels:
- "traefik.enable=true"
- "traefik.http.routers.tim-dash-rtd.rule=Host(`dashboard-rtd.${DOMAIN}`)"
- "traefik.http.routers.tim-dash-rtd.entrypoints=websecure"
- "traefik.http.routers.tim-dash-rtd.tls.certresolver=le"
- "traefik.http.routers.tim-dash-rtd.tls=true"
- "traefik.http.services.tim-dash-rtd.loadbalancer.server.port=80"

networks:
web:
Expand Down
4 changes: 2 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM node:16-slim AS build

WORKDIR /src

COPY package.json package-lock.json ./
RUN npm install
COPY package*.json ./
RUN npm install --force
COPY . ./
RUN npm run build

Expand Down

0 comments on commit 0779fec

Please sign in to comment.