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

#2 - first chunk of adding zq2 documentation. #8

Merged
merged 15 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,10 @@ secret/*

target/
**/target/

# Used for checking out versions of zq2
cache/**
!cache/.gitkeep
# Used for rendering API docs.
zq2/docs/versions/**
docgen/target
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
FROM ubuntu:22.04 AS builder
# Same as zq2 uses, or the z2 build fails :-(
FROM rust:1.78.0-slim-bullseye as builder

ENV DEBIAN_FRONTEND=noninteractive
ENV NEEDRESTART_MODE=a

RUN apt-get update && apt-get dist-upgrade -y
RUN apt-get install -y python3 python3-pip --no-install-recommends
RUN apt-get install -y python3 python3-pip python3-setuptools --no-install-recommends
RUN apt-get install -y protobuf-compiler build-essential libssl-dev pkg-config git cmake
RUN apt autoremove

COPY . /build
RUN pip3 install --no-cache-dir -r /build/requirements.txt


ENV DOC_SOURCE=docs
WORKDIR /build/zq1
RUN mkdocs build
WORKDIR /build/docgen
RUN cargo run /build
WORKDIR /build/zq2
ARG VERSION
ENV VERSION=$VERSION
Expand Down
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ SHELL := /bin/bash
ENVIRONMENT ?= dev
VALID_ENVIRONMENTS := dev stg prd

# Set SERVEOPTS="-a 0.0.0.0:3001" or somesuch to serve at port 3001 on all interfaces.

# Check if the ENVIRONMENT variable is in the list of valid environments
ifeq ($(filter $(ENVIRONMENT),$(VALID_ENVIRONMENTS)),)
$(error Invalid value for ENVIRONMENT. Valid values are dev, stg, or prd.)
Expand All @@ -19,11 +21,15 @@ HERE=$(shell pwd)
VERSION=$(shell cat $(HERE)/VERSION)
export VERSION

.PHONY: autogen dev1 dev2 assemble build run-image push-dev-image image/build-and-push
zq2/docs/mkdocs.yml autogen:
(cd $(HERE)/docgen && cargo run $(HERE))

dev1:
(cd zq1 && DOC_SOURCE=$(HERE)/zq1/docs mkdocs serve)
(cd zq1 && DOC_SOURCE=$(HERE)/zq1/docs mkdocs serve $(SERVEOPTS))

dev2:
(cd zq2 && DOC_SOURCE=$(HERE)/zq2/docs mkdocs serve)
dev2: zq2/docs/mkdocs.yml
(cd zq2 && DOC_SOURCE=$(HERE)/zq2/docs mkdocs serve $(SERVEOPTS))

BINDIR=$(HERE)/obj
HERE_FILES=Dockerfile requirements.txt
Expand Down
Empty file added cache/.gitkeep
Empty file.
Loading
Loading