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

Maybe compile documentation on container start? #1138

Open
muhlemmer opened this issue Aug 23, 2019 · 4 comments
Open

Maybe compile documentation on container start? #1138

muhlemmer opened this issue Aug 23, 2019 · 4 comments

Comments

@muhlemmer
Copy link
Member

To: @kaiyou

Currently the documentation content is build into html at container build time. From that point on, it is a static website. We have the following is hard-coded:

Mailu/docs/conf.py

Lines 39 to 44 in 1a597fb

'stable_version': '1.6',
'versions': [
('1.5', '/1.5/'),
('1.6', '/1.6/'),
('1.7', '/1.7/'),
('master', '/master/')

This needs to match on every release branch, so that every documentation version's container has a proper drop-down for other container

Then there is this build time parsing:

version = release = os.environ.get('VERSION', 'master')

Current workflow

So now, at every release we need to update docs/conf.py for every published release branch. A bit cumbersome.

Proposal

Defer building until the container starts. Move the following build and nginx invocation into a startup script:

Mailu/docs/Dockerfile

Lines 15 to 20 in 1a597fb

RUN mkdir -p /build/$VERSION \
&& sphinx-build /docs /build/$VERSION
EXPOSE 80/tcp
CMD nginx -g "daemon off;"

And parse all the version information in conf.py from the environment. So that we only have to update the .env / docker-compose.yml on the documentation server on each release. (copy of those file live in https://github.com/Mailu/infra)

+ Less maintenance
- Small downtime of the website during container updates

@kaiyou
Copy link
Member

kaiyou commented Aug 31, 2019

Additional con: we will need to include sphinx in the running image and drop the two-stage build we currently have.

That said, I see no decent alternative, so I agree with your proposal.

@muhlemmer
Copy link
Member Author

Well, docs is still a single stage build. Spinx is already shipped with the image. Perhaps your're confused with the admin? 😁

@muhlemmer muhlemmer self-assigned this Sep 2, 2019
@kaiyou
Copy link
Member

kaiyou commented Sep 3, 2019

Well, must be my dreams confused with reality. My bad 😄

@Nebukadneza
Copy link
Member

Hi There,

The Mailu-Project is currently in a bit of a bind! We are short on man-power, and we need to judge if it is possible for us to put in some work on this issue.

To help with that, we are currently trying to find out which issues are actively keeping users from using Mailu, which issues have someone who want to work on them — and which issues may be less important. These a less important ones could be discarded for the time being, until the project is in a more stable and regular state once again.

In order for us to better assess this, it would be helpful if you could put a reaction on this post (use the 😃 icon to the top-right).

  • 👍️ if you need this to be able to use Mailu. Ideally, you’d also be able to test this on your installation, and provide feedback …
  • 🎉 if you find it a nice bonus, but no deal-breaker
  • 🚀 if you want to work on it yourself!
    We want to keep this voting open for 2 weeks from now, so please help out!

@Diman0 Diman0 added the backlog label Sep 25, 2020
@Diman0 Diman0 removed the backlog label Oct 28, 2023
@muhlemmer muhlemmer removed their assignment Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants