Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notes to set up #1

Open
z3ntu opened this issue Jun 10, 2017 · 1 comment
Open

Notes to set up #1

z3ntu opened this issue Jun 10, 2017 · 1 comment

Comments

@z3ntu
Copy link
Member

z3ntu commented Jun 10, 2017

Without Docker

mongo:

use lineageos_updater
db.createUser({user: "user", pwd: "pass", roles: []})

create python venv

python3 -m venv venv

set up

follow https://github.com/WeAreFairphone/lineageos_updater#development-set-up

add build

FLASK_APP=updater.app flask addrom -f lineage-14.1-20170611-UNOFFICIAL-FP2.zip -d FP2 -v 14.1 -t "2017-06-11 12:00:00" -r "unofficial" -m "fake" -u https://fp2.joutubes.nl/builds/full/lineage-14.1-20170609-UNOFFICIAL-FP2.zip
@z3ntu
Copy link
Member Author

z3ntu commented Jun 22, 2017

With Docker

Put the following content in your app.cfg:

MONGODB_DB = 'lineageos_updater'
MONGODB_USERNAME = ''
MONGODB_PASSWORD = ''
MONGODB_HOST = 'db'
MONGODB_PORT = 27017

GERRIT_URL = 'https://review.lineageos.org'
BUILD_SYNC_TIME = 3600
CACHE_TYPE = "simple"

Then start it up

# start everything
docker-compose up -d
# to get a shell (eg run "flask addrom")
docker exec -it lineageosupdater_web_1 /bin/sh

Note, that you won't be able to access the application via port 5000 because it's only exposed to the internal network in docker. Either proxy it through eg apache (see here for an example) or change your docker-compose.yml:

diff --git a/docker-compose.yml b/docker-compose.yml
index 94ff8dd..df1da55 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -2,8 +2,8 @@ version: '3'
 services:
     web:
         build: .
-        expose:
-            - "5000"
+        ports:
+            - "5000:5000"
         volumes:
             - .:/code
         links:

(You have to restart the containers afterwards with docker-compose stop && docker-compose up -d.)

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

No branches or pull requests

1 participant