-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from HumanDynamics/features/docker
Fixed Ansible scripts to run hub code inside a docker
- Loading branch information
Showing
4 changed files
with
38 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
= docker | ||
# docker | ||
|
||
== Development | ||
## Development | ||
For development, you can use the dev_ubuntu.yml (for linux, mac or windows) and dev_jessie.yml (if you are using raspberry pi). For exmaple: | ||
docker-compose -f dev_ubuntu.yml up | ||
|
||
By default, docker will start in standalone mode. However, you can override the default parameters using the run command: | ||
By default, docker will start the hub in standalone mode. However, you can override the default parameters using the run command: | ||
docker-compose -f dev_ubuntu.yml run openbadge-hub-py -m server pull | ||
|
||
For convenience, we mount the local data, logs and config directories as volumes in docker. This allows easier access to the data generated in this mode. | ||
|
||
== Production | ||
TBD. Use docker-compose.yml. Don't forget to populate .env (see .env.sample) | ||
## Production | ||
For production, we use docker volumes to store the data (rather than using the host's dicrectories). It also automatically starts in server mode. | ||
|
||
== Other useful commands | ||
To set it up, create a .env file (use env.example as a template), and change the server address, port and key. | ||
|
||
Next, run docker-compose (it will use docker-compose.yml as default) : | ||
docker-compose up -d | ||
|
||
|
||
## Other useful commands | ||
* Gaining shell: docker-compose -f dev_ubuntu.yml run --entrypoint /bin/bash openbadge-hub-py | ||
* Checking is the hub is running: docker-compose ps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[program:badge_hub] | ||
command=/home/pi/openbadge-hub-py/badge_hub.py -m server pull | ||
command=docker-compose up | ||
directory=/home/pi/openbadge-hub-py/ | ||
autostart=true | ||
autorestart=unexpected | ||
|
||
redirect_stderr=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.