nglaeser / CybersecSite

Website for the USC Cybersecurity Club
1 stars 0 forks source link

Merge docker for when we use DigitalOcean #17

Closed jyn514 closed 6 years ago

jyn514 commented 6 years ago

Can't get docker to work locally; everything looks fine but laptop doesn't accept connections on port 5000. Want to fix that before we merge.

joshua@debian-thinkpad:~/Programming/web/cybersecSite$ docker run -it cybersite &
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
joshua@debian-thinkpad:~/Programming/web/cybersecSite$ telnet localhost 5000
Trying ::1...
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
clayscode commented 6 years ago

Did you cd into the directory and run docker-compose up?

jyn514 commented 6 years ago

Whoops, used plain docker. Here's what I get with docker-compose:

joshua@debian-thinkpad:~/Documents/Programming/web/cybersecSite$ docker-compose up
Starting cybersecsite_web_1
Attaching to cybersecsite_web_1
web_1  |  * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
joshua@debian-thinkpad:~/Documents/Programming/web/cybersecSite$ telnet localhost 5000
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

This is the same thing I get with docker run -it -p 5000:5000 cybersite

jyn514 commented 6 years ago

Looks to be working now. Merging it in.

I did have to run docker-compose build every time the app changed, we could use the volumes feature to avoid that.