mirror of
https://github.com/shouptech/humulus.git
synced 2026-02-03 16:09:44 +00:00
Update install instructions
This commit is contained in:
parent
d15f779ab2
commit
498651149e
1 changed files with 44 additions and 0 deletions
|
|
@ -1,2 +1,46 @@
|
||||||
Installing
|
Installing
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
Docker
|
||||||
|
------
|
||||||
|
|
||||||
|
It is recommended to install Humulus using docker. You can run a container for
|
||||||
|
CouchDB and a container for Humulus on the same machine. Docker makes it easy
|
||||||
|
to update to the latest version.
|
||||||
|
|
||||||
|
The following commands can be ran to setup Humulus in docker:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
# Create a network for all of this to run under
|
||||||
|
sudo docker network create humulus
|
||||||
|
|
||||||
|
# Create a CouchDB container with admin user credentials admin/password
|
||||||
|
sudo docker run -d -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password --network humulus --name couchdb couchdb:latest
|
||||||
|
# Create the databases needed to run in single server mode
|
||||||
|
sudo docker exec -it couchdb /usr/bin/curl -X PUT http://admin:password@127.0.0.1:5984/_users
|
||||||
|
sudo docker exec -it couchdb /usr/bin/curl -X PUT http://admin:password@127.0.0.1:5984/_replicator
|
||||||
|
sudo docker exec -it couchdb /usr/bin/curl -X PUT http://admin:password@127.0.0.1:5984/_global_changes
|
||||||
|
|
||||||
|
# Create a config file for humulus
|
||||||
|
sudo mkdir -p /opt/humulus
|
||||||
|
sudo tee /opt/humulus/settings.py <<EOF
|
||||||
|
SECRET_KEY = "$(uuidgen -r)"
|
||||||
|
COUCH_URL = "http://couchdb:5984"
|
||||||
|
COUCH_USERNAME = "admin"
|
||||||
|
COUCH_PASSWORD = "password"
|
||||||
|
COUCH_DATABASE = "humulus"
|
||||||
|
HUMULUS_PASSWORD = "foobar"
|
||||||
|
EOF
|
||||||
|
# Run a container for humulus
|
||||||
|
sudo docker run -d -e HUMULUS_SETTINGS=/app/settings.py \
|
||||||
|
--mount type=bind,source=/opt/humulus/settings.py,destination=/app/settings.py,ro \
|
||||||
|
-p 8000:8000 --network humulus --name humulus shouptech/humulus:latest
|
||||||
|
|
||||||
|
# Setup the database and import BJCP styles
|
||||||
|
sudo docker exec -it -e HUMULUS_SETTINGS=/app/settings.py -e FLASK_APP=humulus humulus flask build-couch
|
||||||
|
sudo docker exec -it -e HUMULUS_SETTINGS=/app/settings.py -e FLASK_APP=humulus humulus flask import-styles
|
||||||
|
|
||||||
|
After doing the above, point your web browser to http://localhost:8000. Login
|
||||||
|
with the password configured for ``HUMULUS_PASSWORD``. Now get to work creating
|
||||||
|
recipes.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue