Skip to content
New issue

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

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

Already on GitHub? # to your account

Readme reference compose file contents #117

Merged

Conversation

RyanBalfanz
Copy link
Contributor

Reference the contents of compose.yaml directly in the README, for example:

dockge/compose.yaml

Lines 1 to 23 in 2e26178

version: "3.8"
services:
dockge:
image: louislam/dockge:1
restart: unless-stopped
ports:
# Host Port : Container Port
- 5001:5001
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data:/app/data
# If you want to use private registries, you need to share the auth file with Dockge:
# - /root/.docker/:/root/.docker
# Your stacks directory in the host (The paths inside container must be the same as the host)
# ⚠️⚠️ If you did it wrong, your data could end up be written into a wrong path.
# ✔️✔️✔️✔️ CORRECT: - /my-stacks:/my-stacks (Both paths match)
# ❌❌❌❌ WRONG: - /docker:/my-stacks (Both paths do not match)
- /opt/stacks:/opt/stacks
environment:
# Tell Dockge where is your stacks directory
- DOCKGE_STACKS_DIR=/opt/stacks

@louislam
Copy link
Owner

Thanks, but I want to show.

@louislam louislam closed this Nov 21, 2023
@RyanBalfanz
Copy link
Contributor Author

Thanks, but I want to show.

@louislam: Perhaps it is not clear, but the contents will still be shown/visible in the README on Github. It will be displayed in the same way as my original PR description comment.

Here's an article explaining: https://www.stevemar.net/github-code-in-readme/, and the example repo illustrating the feature: https://github.com/stevemar/code-reference-in-readme.

If you still prefer to manage the same file content in two different places then ok no problem. :)

@louislam
Copy link
Owner

https://github.com/RyanBalfanz/dockge/tree/readme-reference-compose-file-contents

Does it also apply to README.md? I checked your branch, it doesn't seem to be working.

@RyanBalfanz
Copy link
Contributor Author

RyanBalfanz commented Nov 21, 2023

https://github.com/RyanBalfanz/dockge/tree/readme-reference-compose-file-contents

Does it also apply to README.md? I checked your branch, it doesn't seem to be working.

Yes, creating a permanent link to a code snippet works in the README.md (and other files) within a repository.

It won't work in my branch because it is a different repository and I updated the link to point to yours. I tried to create a repo agnostic permanent link but that does not work in GH. By using that first commit in my branch, you can observe the change in action in my repo by looking at the README.md file from that point in history: https://github.com/louislam/dockge/tree/1942b81f1a5567e9b2e6ebf683e26c772c066dd0#advanced.

Screenshot 2023-11-21 at 12 31 32 PM

@louislam louislam reopened this Nov 21, 2023
@louislam
Copy link
Owner

Thanks. It is good.

@louislam louislam merged commit 05191b1 into louislam:master Nov 21, 2023
@RyanBalfanz
Copy link
Contributor Author

On the compose file, I created a new discussion post over at #146.

@louislam
Copy link
Owner

Revert back to original, because people don't notice that it is scrollable and only copy first 11 lines. Also there is no copy button.

image

@RyanBalfanz
Copy link
Contributor Author

Revert back to original, because people don't notice that it is scrollable and only copy first 11 lines. Also there is no copy button.

image

@louislam You lost some the fixes from #116 in this revert.

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

Successfully merging this pull request may close these issues.

2 participants