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

Docker: Move docker setup into docs #647

Merged
merged 1 commit into from
May 7, 2022
Merged

Docker: Move docker setup into docs #647

merged 1 commit into from
May 7, 2022

Conversation

schemar
Copy link
Collaborator

@schemar schemar commented May 7, 2022

Fixes #646

@schemar
Copy link
Collaborator Author

schemar commented May 7, 2022

@claremacrae I moved the docker stuff into ./docs.

@schemar schemar merged commit 5fb5c65 into main May 7, 2022
@schemar schemar deleted the docker branch May 7, 2022 13:13
@claremacrae
Copy link
Collaborator

On Mac when I run ./docker_start I get:

+ docker run --rm -it --volume /Users/clare/Documents/develop/Obsidian/claremacrae/obsidian-tasks/docs:/docs:Z --publish 4000:4000 localhost/obsidian-tasks-docs:latest
Unable to find image 'localhost/obsidian-tasks-docs:latest' locally

@claremacrae
Copy link
Collaborator

docker-compose up no longer works:

ERROR: 
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml, compose.yml, compose.yaml

@claremacrae
Copy link
Collaborator

Hi @schemar Sorry to be the bearer of bad news, but this is a regression for me - I can no longer run the docs locally.

I've got my previous version on the branch for the current PR so that will do for now.

- It is converted to HTML via Ruby and Jekyll
- Important: Ruby 2 is required, for example, Ruby 2.7
- The published documentation is at <https://schemar.github.io/obsidian-tasks/>
- For background, including which branch to work on, see ["Updating documentation" in CONTRIBUTING](../CONTRIBUTING.md#updating-documentation)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wondered where these extra spaces were coming from.
There's a curious cycle going on that your edits include extra spaces in bullet lists, and then @sytone (and I think mine) remove them.

It's is only cosmetic, but it does make git annotate/blame rather less useful, and makes reviews take longer, as you have to mentally separate out formatting changes from content ones...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's my LSP based md formatter 🤔

@schemar
Copy link
Collaborator Author

schemar commented May 7, 2022

On Mac when I run ./docker_start I get:


+ docker run --rm -it --volume /Users/clare/Documents/develop/Obsidian/claremacrae/obsidian-tasks/docs:/docs:Z --publish 4000:4000 localhost/obsidian-tasks-docs:latest

Unable to find image 'localhost/obsidian-tasks-docs:latest' locally

Hm, weird. Sorry.

Did it first build the image? Can you try removing the localhost/ part from the last line in the docker_start script and see if that helps?

@schemar
Copy link
Collaborator Author

schemar commented May 7, 2022

The last line should only read $TAG

@schemar
Copy link
Collaborator Author

schemar commented May 7, 2022

I may have run into a podman feature that doesn't exist in docker.

@claremacrae
Copy link
Collaborator

One thing I was curious about is whether the script defaults to always using the local version of the docs. I was curious about what the tag did….

@claremacrae
Copy link
Collaborator

Just curious... What was the motivation for the reworking of the scripts?

@claremacrae
Copy link
Collaborator

(I mean more than changing the paths due to different working directory...)

@claremacrae
Copy link
Collaborator

The last line should only read $TAG

OK That fixed it. Brilliant - thank you very much! I'm back in business! 🎉

I'll create a tiny PR to push that change...

     --volume "$PWD:/docs:Z" \
     --publish 4000:4000 \
-    "localhost/${TAG}"
+    "${TAG}"

@claremacrae
Copy link
Collaborator

One thing I was curious about is whether the script defaults to always using the local version of the docs. I was curious about what the tag did….

Answering my own question: yes, it does pick up changes in the local directory... 🎉

claremacrae added a commit to claremacrae/obsidian-tasks that referenced this pull request May 7, 2022
This enables docker_start to run on my Mac. See obsidian-tasks-group#647.
claremacrae added a commit that referenced this pull request May 7, 2022
This enables docker_start to run on my Mac. See #647.
@schemar
Copy link
Collaborator Author

schemar commented May 7, 2022

Yeah. For this simple use case, docker compose is not really necessary. It's just a container with a mounted volume. Docker compose is not necessarily part of a docker install and may be an additional dependency.

@claremacrae
Copy link
Collaborator

Yeah. For this simple use case, docker compose is not really necessary. It's just a container with a mounted volume. Docker compose is not necessarily part of a docker install and may be an additional dependency.

Thank you. That's good to know.

sytone pushed a commit to sytone/obsidian-tasks that referenced this pull request May 13, 2022
sytone pushed a commit to sytone/obsidian-tasks that referenced this pull request May 13, 2022
This enables docker_start to run on my Mac. See obsidian-tasks-group#647.
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.

Move the Docker configuration to docs/ directory.
2 participants