Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Improve Docker setup + Certbot + Redis DB #30

Merged
merged 32 commits into from Jun 24, 2019

Conversation

aahutsal
Copy link

@aahutsal aahutsal commented Jun 10, 2019

Fix #25

@aahutsal aahutsal mentioned this pull request Jun 10, 2019
@pedrouid
Copy link
Member

pedrouid commented Jun 11, 2019

Add the following to the .gitignore file

ssl/*.pem
ssl/certbot/*
!ssl/certbot/.keep

Dockerfile Outdated Show resolved Hide resolved
@aahutsal aahutsal changed the title WIP: Some work has been done on Gitcoin Improve Docker Setup task Work has been done on Gitcoin Improve Docker Setup task Jun 12, 2019
@aahutsal
Copy link
Author

Please, review @pedrouid

@pedrouid
Copy link
Member

Hey @agutsal, I tested this in a Digital Ocean droplet but certbot was forcing me to choose a domain which I didn't pick.

I used @janus fork of your branch so that I could test both changes at the same time since most of his changes are on the app side. I believe your changes are the ones related to the ssl certificates.

Screenshot 2019-06-21 14 22 33

Basically I saw the messages display above. It asks which names to activate but only allows for 11cee86c.ngrok.io while I was tying to assign it to testing.walletconnect.org.

I have forked @janus fork to add the ssl, nginx and systemd directories that were missing. You can review my changes on this PR: janus#1

However in order to replicate my bug, here are the steps.

  1. Clone forked respository (pedrouid/node-walletconnect-bridge)
  2. Install Docker and Make
  3. Run make setup URL=testing.walletconnect.org
  4. Run make build (this step was successful)
  5. Run make run

I was able to do the whole process until I hit ssl certificate generation problem on make run. Let me know what you think it is. Thanks

@janus
Copy link

janus commented Jun 21, 2019

Hey @agutsal, I just compared your file and @pedrouid on nginx configuration, I found the followings:
1)
listen 80;
server_name bridge.mydomain.com;

listen 80;
server_name localhost:5001;

listen 443 ssl;
server_name bridge.mydomain.com;

listen 443 ssl;
server_name localhost:5001;

@pedrouid , Did the redis side of the app work? And should I merge your PR?

@aahutsal
Copy link
Author

@janus lets wait for @pedrouid answer.

@pedrouid Thanks for so detailed explanation.
11cee86c.ngrok.io been cached somewhere inside github tree it seems. Lemme check and fix.

@aahutsal
Copy link
Author

aahutsal commented Jun 24, 2019

@pedrouid tested locally - still attempts to use 11cee86c.ngrok.io

I'm new to certbot but found that:
image

Now we should find where that forewer cert is saved. Tried different emails and key.pem, cert.pem files removed. Any advice?

@aahutsal
Copy link
Author

Seems that was my mistake, I had to use wildcard cert for *.ngrok.io:
image

@pedrouid
Copy link
Member

pedrouid commented Jun 24, 2019

Let's use Discord, go to https://discord.walletconnect.org

@aahutsal
Copy link
Author

it redirects to https://discordapp.com/channels/492410046307631105/492410046307631107 and stuck. Allow me 15 mins to rest. Will keep trying after that

@pedrouid
Copy link
Member

My Discord is also not loading for some reason

@pedrouid
Copy link
Member

Let's use the WalletConnect Gitter which is unused

https://gitter.im/WalletConnect/Lobby

@pgporada
Copy link

Hi team,

I think I found the problem referenced on https://community.letsencrypt.org/t/certbot-keeps-suggesting-ngrok-domain/96456

The default nginx configuration has an ngrok address at the following line. https://github.com/WalletConnect/node-walletconnect-bridge/pull/30/files#diff-5c29fc0b85522159c4dce0482195bdd8R10

@pedrouid
Copy link
Member

Hi team,

I think I found the problem referenced on https://community.letsencrypt.org/t/certbot-keeps-suggesting-ngrok-domain/96456

The default nginx configuration has an ngrok address at the following line. https://github.com/WalletConnect/node-walletconnect-bridge/pull/30/files#diff-5c29fc0b85522159c4dce0482195bdd8R10

Wow I can't believe we missed that, thanks a lot for your help! 🙏

@pgporada
Copy link

Anytime, best of luck out there! That combined with the changes to the the Makefile at https://github.com/WalletConnect/node-walletconnect-bridge/pull/30/files#diff-b67911656ef5d18c4ae36cb6741b7965R23 I think are what puts the ngrok domain into the container.

@aahutsal
Copy link
Author

@pgporada thanks guys
@pedrouid what to put here, man? lets do it and finish it.

@pedrouid
Copy link
Member

I already fixed it
aahutsal#2

@aahutsal
Copy link
Author

OK. So you're testing now?

@pedrouid
Copy link
Member

Yes, the Docker setup works fine, but the RedisDB implementation is not working yet so I can't merge this yet

@aahutsal
Copy link
Author

aahutsal commented Jun 24, 2019

@janus have you tested it? ^
@pedrouid plz, define the problem

@pedrouid
Copy link
Member

I'm fixing them now, but @janus please pay more attention next time because there were typos plus all redis calls are asynchronous but you didn't adapt them in the rest of the app.

@aahutsal
Copy link
Author

@pedrouid thx man, and sorry for 11cee86c.ngrok.io issue - it's totally mine. Just forgot I've modified defaultConf file

@pedrouid pedrouid changed the base branch from master to improved-docker June 24, 2019 16:50
@pedrouid
Copy link
Member

Hey @agutsal, can you merge aahutsal#2?

@aahutsal
Copy link
Author

done

@pedrouid pedrouid merged commit 31eee4b into WalletConnect:improved-docker Jun 24, 2019
@janus
Copy link

janus commented Jun 24, 2019

I'm fixing them now, but @janus please pay more attention next time because there were typos plus all redis calls are asynchronous but you didn't adapt them in the rest of the app

Sorry for the inconvenience ... I initially asked for test data so that I could test it. It was untested ...

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

Successfully merging this pull request may close these issues.

None yet

4 participants