Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Erro run docker-compose #94

Closed
pepobit opened this issue Apr 5, 2018 · 10 comments
Closed

Erro run docker-compose #94

pepobit opened this issue Apr 5, 2018 · 10 comments
Labels

Comments

@pepobit
Copy link

pepobit commented Apr 5, 2018

When run command docker-compose up --build -d

Occurs next error

Step 5/16 : COPY conf/certbot-auto /usr/bin/
---> Using cache
---> 8ec6386b337c
Step 6/16 : RUN certbot-auto --os-packages-only --non-interactive
---> Running in 4f912a8fce72
/bin/sh: 1: certbot-auto: not found
ERROR: Service 'nginx' failed to build: The command '/bin/sh -c certbot-auto --os-packages-only --non-interactive' returned a non-zero code: 127

How can I solve it?

Thanks.

@stukalin
Copy link
Contributor

stukalin commented Apr 8, 2018

Hmmm. Just tried to re-run it and it worked. What's your host OS? Maybe this could somehow be a problem...

@pepobit
Copy link
Author

pepobit commented Apr 9, 2018

Thanks for the answer.

I re-run it several times and the error persists. The operating system is Windows 10 Pro

@dhavala
Copy link

dhavala commented Apr 12, 2018

I have a Google Compute Engine VM [n1-standard-2 (2 vCPUs, 7.5 GB memory) with 20GB SSD persistent disk] with Ubuntu 16.04 LTS host os. Installed git, docker, and docker-compose.

I have updated the firewalls, dns, and corresponding nginx conf entry (DOMAIN NAME).

I can build docker-compose up --build -d and see for a moment all containers run. But after few mins, the hospitalrun container shuts down. Even after restarting that particular container, I can not access the site.

Just to be sure, I have vncserver running, and can not access localhost:8055 either. However, I can see couchdb's welcome message (via localhost:5985 or mydomain.com:5985)

Before moving to Ubuntu, I tried with Debian Jessie with same result. I have played with different VM instance types (1vCPU, 10GB disk, for example). I also checked few hello world examples on the VM to see that firewalls, dns etc are working. So I am not sure what is the problem. Btw, I have it working on my Mac OS.

Any tips to debug are appreciated and anything in particular to hrun on the cloud (like Digital Ocean, GCP or AWS etc...)

In the mean time, I will try setting up the hard way (without docker)

thanks,
-soma

@dhavala
Copy link

dhavala commented Apr 12, 2018

[update]
was able to run hrun "front-end' via Docker-Compose after adding an additional command
RUN npm config set unsafe-perm true to
https://github.com/HospitalRun/hospitalrun-frontend/blob/master/Dockerfile
right before
RUN npm install -g ember-cli@latest && npm install -g bower
Otherwise, npm fails to install ember-cli and as a result bower is also not installed.

With that I am able to launch localhost:4200 and access the site, add users etc.. I was also able to access it from outside. But only login window appears, and nothing happens afterwards.

But I am over http (not https). Still clueless as to how get it this up and running on the cloud.

@dhavala
Copy link

dhavala commented Apr 12, 2018

[update]
upon inspecting the traffic using Chrome Dev, realized that the connection is unsecure (http) and service workers are not registered. It must be with not enabling https I guess.

@dhavala
Copy link

dhavala commented Apr 12, 2018

[update]

I managed to get hrun+ front-end working on a google compute engine VM. I set up an nginx reverse proxy on the same instance, installed certbot to provision ssl certificates.

setting up nginx reverse proxy (with node)

adding let's encrypt ssl to nginx

A small caveat though. I am not able to create new user's from outside. I could create a new user only from within (on localhost)?

@pedrofmvcmartins
Copy link

pedrofmvcmartins commented Jun 26, 2018

@pepobit Finally was able to figure this error. I was also using Windows 10. After some trial and error switching auto-cert location I got to this error: https://github.com/docker/labs/issues/215.

So the issue is with git for windows that converts LF to CLRF.
To solve it I delete the cloned project, went to git bash console (I was using sourcetree to clone) and ran
git config --global core.autocrlf false
git clone git@github.com:HospitalRun/hospitalrun-server.git

Might want to turn core.autocrlf back to true later.

@sarzali07
Copy link

When run command docker-compose up --build -d

Occurs next error

Pulling couchdb (couchdb:1.7.1)...
Pulling repository docker.io/library/couchdb
ERROR: Tag 1.7.1 not found in repository docker.io/library/couchdb

Regards

@MatthewDorner
Copy link
Contributor

#131

Line endings issue should be helped by the above PR.

@sarzali07 has this error persisted for you? Seems like it could be a temporary issue with the docker repository?

@dhavala there have been fixes to the hospitalrun-server docker setup since your comments, so you could try again if you're still looking to get the server up. I'm not sure why the user wouldn't be able to be created from outside. There is an issue with CouchDB 2.x where apparently users can only be created if user is a couchdb admin, but this isn't related to using localhost vs. outside. HospitalRun/hospitalrun-frontend#953

@stale
Copy link

stale bot commented Aug 7, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

6 participants