Skip to content

add devcontainer support #65

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

add devcontainer support #65

wants to merge 2 commits into from

Conversation

philschatz
Copy link
Member

No description provided.

export $(echo $(cat ./cli.env | sed 's/#.*//g' | sed 's/\r//g' | xargs))

./dockerfiles/docker-entrypoint.sh all-git-pdf philschatz/tiny-book/book-slug1 chemistry main
@philschatz
Copy link
Member Author

philschatz commented Oct 13, 2023

It's been a while and there might be a simpler way to build a PDF inside a devcontainer. Note: This just shows the steps to build a PDF but the workflow should be simplified (see below).

.devcontainer/devcontainer.json

{
  "name": "Local Dev",
  "build": {
    "dockerfile": "../Dockerfile",
    "context": ".."
  },
  "workspaceMount": "source=${localWorkspaceFolder},target=/workspace/enki,type=bind,consistency=default",
  "mounts": [],
  "workspaceFolder": "/workspace/enki"
}

Steps to build a PDF

npm --prefix ./bakery-js/ install
npm --prefix ./bakery-js/ run build
npm --prefix ./mathify/ install

export $(cat cli.env | xargs)
bash -xv ./dockerfiles/docker-entrypoint.sh all-pdf --repo tiny-book --book-slug book-slug-1 --ref main

Ideal commands:

$ step-start tiny-book main
$ all-pdf
$ ./rebuild-styles
$ all-pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant