From 52e5092d13c66df66226b10edd435d7a23404f9e Mon Sep 17 00:00:00 2001 From: Stephan Porada Date: Mon, 16 Mar 2020 10:49:45 +0100 Subject: [PATCH] Add some Readme stuff --- README.md | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index c6868059..ad52d00d 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,8 @@ A shared network space is necessary so that all swarm members have access to all ``` bash # Example: Create a Samba share via Docker # More details can be found under https://hub.docker.com/r/dperson/samba/ -$ sudo mkdir -p /srv/nopaque/storage -$ docker run \ +sudo mkdir -p /srv/nopaque/storage +docker run \ --name opaque_storage \ -v /srv/nopaque/storage:/srv/nopaque/storage \ -p 445:445 \ @@ -55,34 +55,41 @@ $ docker run \ -u nopaque;nopaque # Mount the Samba share on all swarm member nodes with the following code -$ sudo mkdir /mnt/nopaque -$ sudo mount --types cifs --options gid=${USER},password=nopaque,uid=${USER},user=nopaque,vers=3.0 ///storage.nopaque /mnt/nopaque +sudo mkdir /mnt/nopaque +sudo mount --types cifs --options gid=${USER},password=nopaque,uid=${USER},user=nopaque,vers=3.0 ///storage.nopaque /mnt/nopaque ``` 3. **Download Opaque** ``` bash -$ git clone https://gitlab.ub.uni-bielefeld.de/sfb1288inf/opaque.git -$ cd opaque -$ docker-compose pull +git clone https://gitlab.ub.uni-bielefeld.de/sfb1288inf/opaque.git +cd opaque +docker-compose pull ``` 4. **Configure your instance:** For production environments it is recommended to activate and secure the Docker HTTP API. You can read more [here](https://gitlab.ub.uni-bielefeld.de/sfb1288inf/opaque_daemon). ``` bash -$ mkdir logs -$ cp nopaque.env.tpl nopaque.env -$ nopaque.env # Fill out the empty variables within this file. +mkdir logs +cp nopaque.env.tpl nopaque.env + nopaque.env # Fill out the empty variables within this file. For the gitlab login either use your credentials (not recommended) Or create a gitlab token ``` -5. **Start your instance** + +5. Further development instructions +Use the following command to allow docker to pull images from your gitlab registry. TODO: Check if this could also work wit a token? +```bash +docker login gitlab.ub.uni-bielefeld.de:4567 +``` + +6. **Start your instance** ``` bash # Execute the following 3 steps only on first startup -$ docker-compose run web flask db upgrade -$ docker-compose run web flask insert-initial-database-entries -$ docker-compose down +docker-compose run web flask db upgrade +docker-compose run web flask insert-initial-database-entries +docker-compose down -$ docker-compose up +docker-compose up ``` 6. **Alter Database Models** ``` bash -$ docker-compose run web flask db migrate -$ docker-compose run web flask db upgrade +docker-compose run web flask db migrate +docker-compose run web flask db upgrade ```