[SUMO] Setup `/static/` for serving static files (like the current `/media/`)



Infrastructure & Operations
WebOps: Other
6 years ago
4 years ago


(Reporter: rrosario, Assigned: solarce)





6 years ago
One recent change in django is that there is now a STATIC_URL setting and the admin media files are all served from <STATIC_URL>/admin/. We will eventually serve all our static media files from there too, keeping only user uploaded files in /media/.

I don't know the details of what specifically needs to get set up and configured, but basically we need to serve the files in `<kitsune directory>/static/` at http://support.*.org/static/. Everything should be the same as what we have for /media/. Once this is in place we will be able to remove /admin-media/, but that is for a separate bug.

This needs to be done on -dev, stage and prod. Once it is in place, we will be able to try upgrading to django 1.4 again.


6 years ago
Blocks: 740431

Comment 1

6 years ago
I manually added a static directory in kitsune/ on -dev and added appropriate Apache aliases for HTTP and HTTPS

bburton@andesite ~$ curl https://support-dev.allizom.org/static/1.txt                                                     ‹1.9.2-p290›

Is working for me.

Next step would be to commit a static directory to the repo, then one or more test files

Once that's verified on -dev, we can push to -stage and -prod
Assignee: server-ops → bburton

Comment 2

6 years ago
(In reply to Brandon Burton [:solarce] from comment #1)
> Once that's verified on -dev, we can push to -stage and -prod

It is much easier for us to test this on -stage because we have chief and can push deploy any branch and test it out without putting the commits on our master branch. To test on -dev, we have to commit to master and if something goes wrong we would have to revert the commits until we fix and repeat the process until it works.

Can we get this on -stage as well for initial verification?

Comment 3

6 years ago
Sorry, I thought I submitted this comment last week. This has been added to staging

I manually added a dir and file for testing

bburton@andesite ~$ curl https://support.allizom.org/static/1.txt                                                         ‹1.9.2-p290›

If you can add to the repo, i'll pull it down and push out whatever content you want and you can test it out with that

Comment 4

6 years ago
Confirmed this is working on dev and stage:

Just FYI, the static directory and it's files are created/updated by the deploy script. We don't have a static/ in our repository.

Please get this done in prod. Thanks!

Comment 5

6 years ago
Finally live in prod! http://support.mozilla.org/static/admin/js/urlify.js works for me

Please re-open or ping me on irc if anything has an issue
Last Resolved: 6 years ago
Resolution: --- → FIXED
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
You need to log in before you can comment on or make changes to this bug.