Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker to docs site #337

Merged
merged 3 commits into from
Dec 4, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SHELL := /bin/bash
.PHONY: bundled_off prod_web prod_worker prod_scheduler docs remove_running_dev_image clean

bundled: dev_image
docker-compose up
Expand All @@ -18,7 +19,6 @@ scheduler: dev_image
terminal: dev_image
docker-compose -f containers/docker-compose.dev.yml run terminal


prod_web:
docker-compose -f containers/docker-compose.prod.yml run web

Expand All @@ -34,13 +34,9 @@ prod_image:
dev_image:
docker build --pull -t datahub-dev . --build-arg PRODUCTION=false

docs: docs_image
docs:
docker-compose -f docs_website/docker-compose.yml --project-directory=. up

docs_image:
docker build --file docs_website/Dockerfile -t docusaurus-doc .


install:
make install_pip_runtime_dependencies
make install_yarn_packages
Expand Down
10 changes: 10 additions & 0 deletions docs_website/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:14

WORKDIR /opt/docs_website
COPY docs_website/package.json .
COPY docs_website/yarn.lock .
RUN yarn install
COPY docs_website/ /opt/docs_website
COPY docs /opt/docs

ENTRYPOINT yarn start --port ${PORT}
13 changes: 13 additions & 0 deletions docs_website/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '2.1'

# volumes:
# node_modules:
services:
docs:
build:
context: .
dockerfile: ./docs_website/Dockerfile
container_name: datahub_docs
network_mode: 'host'
environment:
PORT: ${PORT:-3000}