-
-
Notifications
You must be signed in to change notification settings - Fork 979
Add docker documentation #1446
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
base: main
Are you sure you want to change the base?
Add docker documentation #1446
Conversation
|
Can anyone review my PR or at least give me some areas for improvement. 😃 |
Nevermind. It was to dump developers to look at it. It's not an insult. I agree with the content. |
|
Ha ok mb, I did check the meaning, but I couldn't find any positive meaning. |
|
Wow, I'm sorry that this slipped under my radar. I'll try to take a look within the next 10 days (I'm travelling so I don't want to commit to anything sooner, but I'm now paying attention!) |
8b32450 to
509ceaf
Compare
|
8391f7b to
8d6947b
Compare
content/en/admin/docker.md
Outdated
|
|
||
| ```sh | ||
| # Clone Mastodon git repo | ||
| git clone https://github.com/tootsuite/mastodon.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| git clone https://github.com/tootsuite/mastodon.git | |
| git clone https://github.com/mastodon/mastodon.git |
content/en/admin/docker.md
Outdated
| --confirmed \ | ||
| --role Owner | ||
|
|
||
| tootctl accounts approve admin # admin account username |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is both in this section, and in the next section - on purpose?
|
@Arcelone curious if you are still interested/available in nudging this forward. I closed some historical PRs/issues in favor of this one issue #1547 and this current PR. If you are not interested, or I don't hear from you in a bit, I'll copy/rebase this and re-open elsewhere ... trying some bare minimum of "how to docker" in place. |
|
First of all, a few things:
|
|
Which person doesn't want docker documentation? |
Excellent, will leave this open and try to help with the rest of your points.
Yes, I'm sorry for this. I don't fully understand why the repo is not maintained, and I can't get anyone to answer that question for me either. It does appear we've got some recent momentum on closing/moving stuff so I'm cautiously optimistic.
I will attempt to ping such persons, and report back.
That seems like a weirdly strong view for something which has been present and maintained in the project for years, and for which thousands of people are using. Do you have any sense of the nature of the objections? My understanding is that Docker is not the "officially recommended" way, but it is ... a way?! Maybe we can add an "This is not our official or best way to deploy, but here are some steps to Docker" type of warning to the top of the page? Is that the nature of the concern, or were there other objections?
Yes, will absolutely leave you as the committer, and that will be preserved (to extent allow by GH repo settings). |
This person from the Mastodon organisation, Nightpool, is systematically against all Docker/container workflows (Compose or K8S). Here are his comments on issues 770, 1035 and 793: |
|
I'll chip in here as someone on the core team. I don't believe we're against having this documentation. I recognise that I've previously said I'd look into this PR, and didn't get it merged; I'd need someone else to help with technical validation and checking of whatever ends up in the formal documentation. I'd also want someone on the core engineering team to look over the docs as well, to make sure that we're happy with the recommendations. I know this has been open for an overdue amount of time, so I'm glad to see interest from others in helping to get it "across the line" - thank you! |
|
I'll update this PR with up to date informations, (repo name, install method, script etc..). As stated in my initial PR I just need informations about the header of the file
But I do not have the necessary skills at the moment to provide a correct production ready K8S manifest. |
8d6947b to
9f346ee
Compare
|
Sounds good. Thanks for the updates. I would definitely focus on just hitting the bare minimum to correctly use the docker setup from the main repo. We can hit edge cases, nuance, optional features, etc in future updates. Also FYI the "weight" thing controls the order of appearance in the sidebar links for the section. Feel free to use whatever you think makes sense. I think if it's left blank it will fall to the bottom. |
|
I see a commit push from last week ... is this ready for re-review, or was that just a rebase push and you're still going to edit further first? |
|
To set expectations - we still would want to do lot of review and test work here; this is not likely to happen very soon. |
No I just did a rebase, I didn't had time to work in this. I was on something else. I'll add a message to tell you when it will be ready for review. |
|
Thanks for taking the time to look into this and all the patience! I am no docker expert, so I just have two high-level observations / remarks:
|
|
There is also a discussion about the current status of the docker content in the main project, which is very related to the ability to merge this PR - it would be best to come to a point that we feel comfortable with what the supported code / devops assets do, and have that documented, rather than making modifications in different places. That, overall, is largely what the delay has been on handling this particular doc update. |
|
Just to let you know that it's a work in progress. In addition to the documentation, I have some recommendations regarding the Docker-Compose.yml file in the main repository. For example, why use a Postgres V14 as the database container image? The last update to this line was 4 years ago. The main documentation (for systemd setup) mention PGSQL v18. EDIT : I haven't seen the link mentioned by andypiper. |
|
I have rewrite almost all the doc, I'm at the nginx part. I wanna wish you all a Merry Christmas. 🎅🏻 🎄 🎁 I think I'll also open PRs on the main repository, for example for the NGINX configuration compatible with Docker. This will avoid all @oneiros the nginx file needs to be change if you use a nginx container, if you use a local host nginx the file is almost good. It all depends of how you want setup your environment. |
|
However, I need some help, because despite searching the source code, I haven't been able to find where the user and database are created during the first login for configuration. I haven't found the code associated with the db:setup task. I'm not familiar with Ruby, let alone Rails. Maybe it's included in the ActiveRecord from Rails idk. |
fa8278e to
c7697ee
Compare
nginx via systemd not via docker
…ault nginx configuration file.
…t is confirmed by the wizard.
|
Hi, I see the ping, but havent been following the edits/updates closely ... is this a ping because this is ready for review, or a ping because you need more info here? If the latter, much of the initial data population is done by either https://github.com/mastodon/mastodon/tree/main/db/seeds / https://github.com/mastodon/mastodon/blob/main/lib/tasks/mastodon.rake The |
|
I think it's ready for review. The following were taken into consideration:
My question about the database setup was to understand the exact workflow for the initial setup. |
| If you want to enable ElasticSearch uncomment the `es` service in the `docker-compose.yml`. | ||
|
|
||
| If you want to enable federation with Tor instances uncomment the `tor` and the `privoxy` service in `docker-compose.yml`. | ||
| And and the following environment variable to the `.env.production`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| And and the following environment variable to the `.env.production`: | |
| Add the following environment variable to the `.env.production`: |
|
|
||
| To access the Mastodon web instance you need to configure a proxy, like Nginx. | ||
|
|
||
| The mastodon web and streaming service are listening on 127.0.0.1 so you need setup nginx to redirect the traffic from port 80 and 443 of you machine to the web and streaming container which are listening on 127.0.0.1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The mastodon web and streaming service are listening on 127.0.0.1 so you need setup nginx to redirect the traffic from port 80 and 443 of you machine to the web and streaming container which are listening on 127.0.0.1. | |
| The mastodon web and streaming service are listening on 127.0.0.1 so you need to setup nginx to redirect the traffic from port 80 and 443 of your machine to the web and streaming container which are listening on 127.0.0.1. |
mjankowski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few minor wording comments, but I think overall it looks good. Some nice followups might be:
- Do once over on style/language/format/etc to align with rest of the docs (no huge stuff on this front, I just dont want to obsess over it for initial creation of this page)
- I'm not sure exactly how this would even work, but it would be delightful if we could somehow have these docs either literally be runnable code, or produce runnable code, and we could have the main repo and/or docs repo CI tasks validate that it continues to work as the main repo changes, docker changes, underlying OS assumptions changes, etc. Way out of scope for first pass, just a thought.
- To the extent things are repeated in this page and the other how to install pages, either have them link to each other, and/or find some way to keep in sync
All that said, I think given a standard of "we dont have any docker docs at all now", this does IMO get above that low bar of just getting something. Thanks for updating!
I know the core team is busy, but hopefully someone can take a look for you here.
Hi everyone,
I've found myself needing to create a local Mastodon instance for a Lab (something that's at test/demo level).
First of all, I browsed the documentation and the official repository and I saw that the debate on the need / desire to add documentation for docker.
However, as I haven't found a satisfactory tutorial or alternative on the Internet, I've taken the liberty of making a functional version, as detailed as possible, of what I'd like to find in the official documentation.
I'm sure it's not perfect, but if anyone would like to add or modify it, please don't hesitate.
PS: I didn't know what value to enter for "Weight", please feel free to modify it.
This will (at least partially) resolve these issues :