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

Update docker-compose to cope with build-time assets #8156

Merged
merged 1 commit into from Aug 9, 2018

Conversation

Projects
None yet
4 participants
@insom
Copy link
Contributor

insom commented Aug 9, 2018

#7780 means that asset compilation happens as a build step.

Having the assets and packs volumes defined in docker-compose.yml breaks this. For people who run under Docker Compose, I believe this will fix their CSS (which even running the asset recompilation separately did not).

Update docker-compose to cope with build-time assets
#7780 means that asset compilation happens as a build step.

Having the assets and packs volumes defined in `docker-compose.yml` breaks this. For people who run under Docker Compose, I believe this will fix their CSS (which even running the asset recompilation separately did not).
@Gargron

Gargron approved these changes Aug 9, 2018

@Gargron Gargron merged commit 8c279b1 into tootsuite:master Aug 9, 2018

11 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: check-i18n Your tests passed on CircleCI!
Details
ci/circleci: install Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.3 Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.4 Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.5 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.3 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.4 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.5 Your tests passed on CircleCI!
Details
ci/circleci: test-webui Your tests passed on CircleCI!
Details
codeclimate All good!
Details
@Shadowghost

This comment has been minimized.

Copy link

Shadowghost commented Aug 13, 2018

Since apache reverse proxies require the assets to be accessible from the host, this PR breaks the reverse proxy. I checked and tested it with the latest master. Any ideas how to solve this without reverting this PR?

@Gargron

This comment has been minimized.

Copy link
Member

Gargron commented Aug 13, 2018

@Shadowghost The requests for assets should go to the Puma process instead of trying to access them from disk. It's worse performance and I don't like it but I had a lot of pressure from admins angry that they have to assets:precompile on every update.

@Shadowghost

This comment has been minimized.

Copy link

Shadowghost commented Aug 13, 2018

How to do that exactly when running the docker images behind an apache reverse proxy? Documentation should be updated if this goes live with the next release. I can understand the pressuring, it's annoying :)

@nightpool

This comment has been minimized.

Copy link
Collaborator

nightpool commented Aug 13, 2018

@insom

This comment has been minimized.

Copy link
Contributor

insom commented Aug 13, 2018

I was already passing these requests to Puma, so didn't notice, but I see that the documentation reverse proxy alternatives has a line:

 ProxyPassMatch ^/(assets|avatars|emoji|headers|packs|sounds|system|.well-known/acme-challenge) !

which would also need to have assets and packs removed.

Looks similar in the Nginx config, too

byronhulcher added a commit to byronhulcher/mastodon that referenced this pull request Aug 18, 2018

Update docker-compose to cope with build-time assets (tootsuite#8156)
tootsuite#7780 means that asset compilation happens as a build step.

Having the assets and packs volumes defined in `docker-compose.yml` breaks this. For people who run under Docker Compose, I believe this will fix their CSS (which even running the asset recompilation separately did not).

kyori19 added a commit to kyori19/mastodon that referenced this pull request Sep 20, 2018

Update docker-compose to cope with build-time assets (tootsuite#8156)
tootsuite#7780 means that asset compilation happens as a build step.

Having the assets and packs volumes defined in `docker-compose.yml` breaks this. For people who run under Docker Compose, I believe this will fix their CSS (which even running the asset recompilation separately did not).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment