Closed rfk closed 7 years ago
cc @jbuck
@rfk could you please push to this PR again to trigger Circle CI. I don't have access
pushed
@vladikoff also I added you as a collaborator on this repo
@rfk
Collecting nose==0.9.18.1 (from -r dev-requirements.txt (line 2))
Could not find a version that satisfies the requirement nose==0.9.18.1 (from -r dev-requirements.txt (line 2)) (from versions: 1.0.0, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.6, 1.3.7)
No distributions matching the version for nose==0.9.18.1 (from -r dev-requirements.txt (line 2))
make: *** [local/bin/flake8] Error 1
:(
Whoops; should be fixed in the latest push...
@rfk I was trying to run this with @jrgm and we are having issues.
@jrgm had luck getting it running by adding COPY ./syncserver.ini /app/syncserver.ini
, but it is not clear if we need that or not.
@jrgm had luck getting it running by adding COPY ./syncserver.ini /app/syncserver.ini, but it is not clear if we need that or not.
Yeah, that's not needed. I should be able to do SYNCSERVER_SQLURI=sqlite:////tmp/syncserver.db
instead. Or SYNCSERVER_SQLURI=pymysql://root:......
for mysql.
had luck getting it running by adding COPY ./syncserver.ini /app/syncserver.ini, but it is not clear if we need that or not.
I would like for this not to be needed, relying instead on env vars.
I also had to expose the port with -p 5000:5000
, but in ansible docker_container, or in the dockerflow, something similar.
I've pushed some docs in the README on how to run the server from within the docker container; I'm yet to get the port exposed properly so I haven't been able to fully test them though.
Creds have been added to the circle ci build job, so this should deploy to docker hub once it's merged to master
I started up the server with:
➜ syncserver git:(dockerflow) docker run --rm -p 5000:5000 -e SYNCSERVER_PUBLIC_URL=http://localhost:5000 -e SYNCSERVER_SECRET=5up3rS3kr1t -e SYNCSERVER_SQLURI=sqlite:////tmp/syncserver.db -e SYNCSERVER_BATCH_UPLOAD_ENABLED=true syncserver:latest /usr/local/bin/gunicorn --bind localhost:5000 syncserver.wsgi_app
[2017-05-11 18:00:32 +0000] [7] [INFO] Starting gunicorn 19.6.0
[2017-05-11 18:00:32 +0000] [7] [INFO] Listening at: http://127.0.0.1:5000 (7)
[2017-05-11 18:00:32 +0000] [7] [INFO] Using worker: sync
[2017-05-11 18:00:32 +0000] [11] [INFO] Booting worker with pid: 11
/usr/local/lib/python2.7/site-packages/tokenserver/verifiers.py:50: FutureWarning: The BrowserID certificate format has not been finalized and may change in backwards-incompatible ways. If you find that the latest version of this module cannot verify a valid BrowserID assertion, please contact the author.
super(LocalVerifier, self).__init__(**kwargs)
However, for http://127.0.0.1:5000/ and http://localhost:5000/ I'm getting
This page isn’t working
localhost didn’t send any data.
ERR_EMPTY_RESPONSE
@vladikoff @jrgm this appears to be working now \o/
Here's what I did:
docker build -t syncserver:latest .
b. docker run --rm --network host -p 5000:5000 -e SYNCSERVER_PUBLIC_URL=http://localhost:5000 -e SYNCSERVER_SECRET=xyz123 -e SYNCSERVER_SQLURI=sqlite:////tmp/syncserver.db -e SYNCSERVER_BATCH_UPLOAD_ENABLED=true syncserver:latest /usr/local/bin/gunicorn --bind localhost:5000 syncserver.wsgi_app
make build
b. ./local/bin/python -m syncstorage.tests.functional.test_storage --use-token-server http://localhost:5000/token/1.0/sync/1.5
What are next steps for trying this out in fxa-dev?
I tried rebuilding this locally and it's not working for me. However I'm gonna merge this so we can check if the circle ci build will boot up on my machine
WIP for now...