docker-compose.yml

Showing 1-13 of 13 messages
docker-compose.yml Bill Burcham 6/30/15 10:35 AM
I found the installation guide very easy to follow. Thank goodness we use Docker.

Nevertheless, there were a few hiccups for me. I don't really have a suitable Internet-routable mail server, so I needed to set up a dedicated mail service. The other thing was that the guide wasn't explicit about how to set up PostgreSQL. Oh and the guide omitted an important init step that had to be done after all the containers were started the first time.

Initially, I got this working as a shell script. Then I ported it to the nifty new Docker Compose tool. So if you want to get a local, single-user, test system up and running with a single command, just copy this docker-compose.yml to your clone of hypothesis/h:


There are detailed instructions in the comments at the top of that Gist. Basically, you run docker-compose on that YAML file and that spins up and links all your containers. Then you log in to the hypothes.is container and run a db initialization command. After that you can browse to the Hypothes.is app locally and you have a web based interface to the email server where you can see your invitations.

This is by no means a perfect setup:
  • MailCatcher exposes SMTP on port 1025. I mapped that to port 25 on the host. That's a bit hokey. Might have been better to stick an ambassador in front of MailCatcher for that purpose (no reason to have port 25 actually exposed on the host).
  • it seems like I ought to be able to automate the (currently manual) post-startup db init step
But there it is. I hope somebody finds it useful.

Re: [h-dev] docker-compose.yml Randall Leeds 6/30/15 10:40 AM

Excellent!

Thanks for this.

As for the DB creation, you can have it done automatically by setting MODEL_CREATE_ALL=true in the environment.

If you can spare the cycles for any documentation updates and submitting the compose file I'd like to see this improve for the next person.


--
You received this message because you are subscribed to the Google Groups "dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@list.hypothes.is.
To post to this group, send email to d...@list.hypothes.is.
To view this discussion on the web visit https://groups.google.com/a/list.hypothes.is/d/msgid/dev/48f936b3-853d-4550-be4c-027f54208484%40list.hypothes.is.
Re: [h-dev] docker-compose.yml Bill Burcham 6/30/15 10:45 AM
I hesitated to just drop docker-compose.yml into the root dir in a PR since this composition is not a "production" one.

Maybe I should make a subdir called docker-compose in the root and stick environment dirs under that. So maybe this could go in:

./docker-compose/single-user-local-test/docker-compose.yml

Then we would have a place to add production later for instance. (Though I'll bet everybody'll have a different spin on that).

And I'll try MODEL_CREATE_ALL=true. Thanks for the tip!
Re: [h-dev] docker-compose.yml Randall Leeds 6/30/15 10:53 AM
There's the conf dir already that has the .ini files. I wonder if we should consolidate that with the docker compose under etc or some such thing.

--
You received this message because you are subscribed to the Google Groups "dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@list.hypothes.is.
To post to this group, send email to d...@list.hypothes.is.
To view this discussion on the web visit https://groups.google.com/a/list.hypothes.is/d/msgid/dev/079d5faa-39bd-45e1-90c0-ebe98c58bc87%40list.hypothes.is.
Re: [h-dev] docker-compose.yml Bill Burcham 6/30/15 12:28 PM
I just updated the Gist with your MODEL_CREATE_ALL=true suggestion. You no longer have to shell in to the container to finish setup:


Now Randall, when you say:
There's the conf dir already that has the .ini files. I wonder if we should consolidate that with the docker compose under etc or some such thing.
I don't quite follow. Would this be a good structure to add for the new docker-compose.yml:

/conf/docker-compose/single-user-local-test/docker-compose.yml

Or did you have something else in mind?
Re: [h-dev] docker-compose.yml Randall Leeds 6/30/15 3:25 PM
I don't quite know :)

I was just giving you a suggestion. Maybe we decide conf isn't right and we want an etc directory. I don't know.

I'm happy to work these details out later though. If you have a worker docker-compose.yml, open a PR and we can put it in the root for the time being.

--
You received this message because you are subscribed to the Google Groups "dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@list.hypothes.is.
To post to this group, send email to d...@list.hypothes.is.
To view this discussion on the web visit https://groups.google.com/a/list.hypothes.is/d/msgid/dev/3e1c2a53-c206-4795-be53-e3504cbd134b%40list.hypothes.is.
Re: docker-compose.yml sofaro...@gmail.com 5/1/16 8:50 AM
Hi, your script is super and very useful. your script run without this following line, because  i got this error-message: 

ERROR: Validation failed in file './docker-compose.yml', reason(s):

hh.environment.MODEL_CREATE_ALL contains true, which is an invalid type, it should be a string, number, or a null


And the another point is: How can i run the db initialization command. I'am so sorry for my questions. i'am unfortunately a newby.

Thank you very much.
unk...@googlegroups.com 5/1/16 9:09 AM <This message has been deleted.>
Re: docker-compose.yml cartur 5/2/16 1:42 AM
Have nobody an idea?
Re: [h-dev] Re: docker-compose.yml Randall Leeds 5/2/16 7:46 AM

Maybe the MODEL_CREATE_ALL value needs to be quoted so that it's interpreted as a string rather than a boolean.


--
You received this message because you are subscribed to the Google Groups "dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@list.hypothes.is.
To post to this group, send email to d...@list.hypothes.is.
To view this discussion on the web visit https://groups.google.com/a/list.hypothes.is/d/msgid/dev/6154177b-ab37-4dcb-a7fe-d3220b4f7ca3%40list.hypothes.is.
Re: [h-dev] Re: docker-compose.yml Bill Burcham 5/2/16 8:14 AM
Yeah, see the doc for setting environment variables in docker-compose:


It says: 

"Any boolean values; true, false, yes no, need to be enclosed in quotes to ensure they are not converted to True or False by the YML parser."

Re: [h-dev] Re: docker-compose.yml cartur 5/11/16 11:27 PM
Thank you for your response. The Tip for setting environment variables in docker-compose was right :-) Thank you.

Nevertheless, when I try to install hypothesis under the script-instruction from Bill Burcham, i get Internal Server Error 404 (http://192.168.59.103:8000/).

>My setup details are:
- Mac OS X 10.11.4
- Boot2Docker.pkg
- Docker-Tools.pkg
- Docker-Compose.yml (script from Bill Burcham)

I try following steps to install hypothesis:

1. Installing Boot2Docker and Docker-Tools
boot2docker ip: > 192.168.59.103

2. Clone hypothesis/h
    - git clone https://github.com/hypothesis/h.git
    - cd h/
3. Copy docker-compose.yml in h-directory and run the script with: docker-compose up -d

4. After the installation I browse to http://192.168.59.103:8000/ and get an Error: "the connection to the server could not be established".

I have no idea where to continue the setup or fix this problem.

I would be very grateful if somebody help me.

Thank you








Re: [h-dev] Re: docker-compose.yml cartur 5/12/16 12:45 AM
When i look the log-files, i get gunicorn-error:

Raven is not configured (logging is disabled). Please see the documentation for more information.
2016-05-12 06:47:10,205 [1] [gunicorn.error:INFO] Starting gunicorn 19.4.5
2016-05-12 06:47:10,210 [1] [gunicorn.error:INFO] Listening at: http://0.0.0.0:5000 (1)
2016-05-12 06:47:10,210 [1] [gunicorn.error:INFO] Using worker: sync
2016-05-12 06:47:10,215 [15] [gunicorn.error:INFO] Booting worker with pid: 15
2016-05-12 06:47:11,033 [15] [h.config:WARNING] error parsing environment variable MAIL_PORT='tcp://172.17.0.6:1025' as int
2016-05-12 06:47:11,035 [15] [h.config:WARNING] error parsing environment variable REDIS_PORT='tcp://172.17.0.3:6379' as int
2016-05-12 06:47:11,041 [15] [h.config:WARNING] No secret key provided: using transient key. Please configure the secret_key setting or the SECRET_KEY environment variable!
2016-05-12 06:47:12,480 [15] [gunicorn.error:ERROR] Exception in worker process:
Traceback (most recent call last):