Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Running Brick on Intranet #118

Open
Fastidious opened this issue Sep 12, 2015 · 6 comments
Open

Running Brick on Intranet #118

Fastidious opened this issue Sep 12, 2015 · 6 comments
Labels

Comments

@Fastidious
Copy link

How would I go to get Brick running on an Intranet? Is it something that is relatively easy to install?

@alfredxing
Copy link
Owner

Are you looking to host everything yourself? Or just link to the stylesheet? If the latter, it would require a request to the internet.

If you want to host everything yourself: you can clone this repo, then use Jekyll to build it. Then you can use either the brick.php or brick.go file for the requests.

@Fastidious
Copy link
Author

@alfredxing no need to modify anything on brick.php or brick.go? It will work, just out of the box?

@alfredxing
Copy link
Owner

@Fastidious It should (after you build it with Jekyll, as mentioned above)! It runs okay on my OS X machine, and in prod it runs on Linux. Let me know if you run into any issues!

@alfredxing
Copy link
Owner

Oh, actually, the Go version works out of the box, the PHP one would obviously need some server config (I use nginx). Just rewrite everything to that script.

@Fastidious
Copy link
Author

@alfredxing I see:

uri.WriteString("url(//brick.a.ssl.fastly.net/fonts/")

on the brick.go file (similar on the PHP file). Are you sure that will run fine on an Intranet (no Internet access at all)?

@alfredxing
Copy link
Owner

Oh, hm, sorry about that! I'm almost completely forgetting how Brick works on the backend.
Changing that to the URL of the server hosting the fonts should work.

Just going back to server configuration as well: this is the nginx rewrite I'm using

location / {
    index  index.html;
    rewrite ^([^\.]*)$ /brick.php?q=1;
}

This also means that what I said earlier about the Go file "working out of the box" is incorrect as well: you'll need to run a server like nginx to serve all of the font files, and run the Go CSS server on a different port. You can then either live with having these 2 different ports, or if you want, reverse proxy to the Go server in your nginx config.

Again, my sincere apologies for the incorrect information!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants