Docker deployment for *.hardcoded.net
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
containers
website
.gitignore
README.md
cmds.py
get-pip.py
manage
manage.py

README.md

Docker-deployed hardcoded.net website

I'm adopting docker! This collection of scripts can, using Docker, deploy all services under hardcoded.net.

Requirements

That's the beauty of this all: The only thing you need is Docker (and Python 3.3+)!

You also have to make sure that you're in the docker group to avoid having to sudo all your commands. To test that you are, run docker ps. If it doesn't error out, you're alright.

Populating the data folder

To run, there's some non-public data that our apps need and that needs to be placed in the data subfolder:

secret.txt: A text file containing the SECRET_KEY django settings for the forum.

currency.db: The sqlite db of the currency server.

forum.sql.gz: A postgres dump of the forum's data. Only used for the importforum command.

Run the thing

$ ln -s /path/to/download/root www/download
$ ./manage make
$ ./manage webgen all
$ ./manage start
$ ./manage importforum

and stop the server with:

$ ./manage stop

The download root is a folder containing the stuff available at download.hardcoded.net.

If you're running this locally, you'll have to tweak your /etc/hosts with something that looks like:

127.0.0.1 www.hardcoded.net
127.0.0.1 download.hardcoded.net
127.0.0.1 open.hardcoded.net
127.0.0.1 forum.hardcoded.net

Containers

build-www is used to render the static pages of www.hardcoded.net and open.hardcoded.net. It only runs during make.sh and ouputs static pages to www/html and www/html_openhs.

hardcoded.net is the main nginx server. It serves static files for www, download and open and serves as a proxy for the rest of the services running in other containers.

forum.hardcoded.net is a uwsgi instance serving forum.hardcoded.net.

currency.hardcoded.net is an XMLRPC server serving out moneyGuru's currency exchange rates.

fuelfacts.hardcoded.net is a little website I started building a few months ago.