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

Docker set up doesn't work for me #232

Open
caprenter opened this issue May 4, 2022 · 6 comments
Open

Docker set up doesn't work for me #232

caprenter opened this issue May 4, 2022 · 6 comments
Labels
development environment Impacts the development environment only, not production

Comments

@caprenter
Copy link
Contributor

caprenter commented May 4, 2022

Operating system

Ubuntu 20.04

Browser name and version

Firefox 99

Expected behavior

I'm expecting to see a running streaming site on http://localhost:8080 when I run docker-compose up -d

Actual behavior

The build fails in a couple of places. When I fix those I don't seem to have a persistent image that stays up

Steps to reproduce behavior

Clone the repo
cd stream
docker-compose up -d
Build will fail.
Two steps to help it along:
Error: missing .env file
in /embed create a .env file from the .env.example (I did not change any of the contents)
Error: missing directory
mkdir dhparam/ (for the certificates to sit in)

I'm no docker expert, so sorry if I've missed the point somewhere.
If the docker build is something that should be easy for development, then I'm happy to help document it.

@caprenter caprenter changed the title Docker set up Docker set up doesn't work for me May 4, 2022
@auggod
Copy link
Member

auggod commented May 4, 2022

The docker compose config is up to you. I think, after adding the missing .env and creating the dhparam dir, it should be working.

@caprenter
Copy link
Contributor Author

Ok - thanks. I'll investigate further.

@auggod
Copy link
Member

auggod commented May 4, 2022

Maybe the changes I have just made to the docker-compose.yml file will help.

@caprenter
Copy link
Contributor Author

Yes that does help. Thanks! I am relatively new to using docker, so maybe I should have spotted something odd with those volumes, but I didn't!

So to confirm. I'm pretty sure my steps are:

Clone the repo and cd into it:
[email protected]:resonatecoop/stream.git
cd stream

Create 2 .env files
cp beta/.env.example beta/.env
cp embed/.env.example embed/.env

Create a directory for the certbot certificates
mkdir dhparam/

then run

docker-compose up -d

When completed you will have 4 containers, stream_beta_1, stream_embed_1, webserver, certbot

And the services are at:
http://localhost:8080
http://localhost:8081

@peterklingelhofer peterklingelhofer added the development environment Impacts the development environment only, not production label May 5, 2022
@caprenter
Copy link
Contributor Author

caprenter commented May 5, 2022

Just an update.

I think the above gives me a version of the site that runs, but that cannot be developed easily.
(i.e. if I change a file, it doesn't update on the fly)
I've been googling around and also seen posts about how and when the npm install command is run, and setting up volumes outside the container so that node can watch changes (or the use of the 'nodemon' module to watch for changes)

So I have a friend that I think I can persuade to help me figure out a good working dev solution with docker.
If anyone else already does this and can point me to instructions, then that would save me some time (and from having to learn anything - ha!), but I'll happily come back and share if I get there before that.

I'm actually running stuff without docker simply and easily, so I can try to develop without it - but I quite like the docker stuff for knowing I have the same shared development environment as others.

Thanks for all your help folks.

@simonv3
Copy link

simonv3 commented May 5, 2022

FWIW, in my experience doing automatic reloaded front-end web dev inside docker can be pretty slow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development environment Impacts the development environment only, not production
Projects
None yet
Development

No branches or pull requests

4 participants