Skip to content

Simplify local builds with Docker Compose, Also updated README #841

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

Merged
merged 12 commits into from
Feb 23, 2018

Conversation

jarrodu
Copy link
Member

@jarrodu jarrodu commented Feb 16, 2018

Feel free to look around if you like. I will get back to this tonight or tomorrow. :-)

The main things I still need to do is to provide a reason for the change and update the readme with how to use it.

@jarrodu
Copy link
Member Author

jarrodu commented Feb 17, 2018

I still need to update the readme but could some of you check this out?

I am using docker and docker-compose to make it easier for current developers to stay in sync and also make it easier for new contributions. Scala developers probably don't want to deal with the specifics of ruby, rbenv, rvm, bundle, jekyll, etc.

They are probably familiar with html, markdown, docker, and docker-compose.

The commands to run are in the bin directory but should all be run from the root directory. ie. bin/serve or bin/bundle exec ...

The first time you run bin/serve a docker image will be downloaded and all the gems will also be downloaded. Then jekyll will build the site and start the server. If you run it again you will already have the image and the gems.

Also checkout:
cat bin/*

If this PR gets any traction or feedback I will polish it up and start working on the readme. :-)

@heathermiller @SethTisue @ashawley @OlivierBlanvillain @Philippus

@jarrodu
Copy link
Member Author

jarrodu commented Feb 20, 2018

Is anyone interested in trying this out? If not than I can close the PR.

I am hoping this will help get more contributers into the project.

@pfgray
Copy link

pfgray commented Feb 20, 2018

@jarrodu , FWIW I had not known of this project until 30 minutes ago, and got this up and running, and made a change in under 10 mins:

screen shot 2018-02-20 at 2 05 06 pm

@jarrodu
Copy link
Member Author

jarrodu commented Feb 20, 2018

That is so cool! Thanks so much for sharing.

@propensive
Copy link
Contributor

I tried it, and it works! I had to install docker-compose (a quick check to see whether it exists in the bin/serve script would be useful), but the process of testing the website was much easier that my previous experience, so I would like to see this merged.

If you would like to finish polishing up the PR, I'll be happy to merge it unless anyone else objects? I trust that everything you've included here is complementary to the existing process for updating the website. In the unlikely event that it does, make sure it's documented as anyone with an existing process which works for them would certainly need to know! :)

@jarrodu
Copy link
Member Author

jarrodu commented Feb 21, 2018

Thanks for the positive encouragement. I will go through everything in detail tomorrow. Today I am getting a cat! I will also review and update the README.

As far as I can tell this should not change the build process for people that are already comfortable with their setups. It will also not change the Travis build. We will see how well people like this and maybe in the future I can expand the scope a bit.

@SethTisue
Copy link
Member

I haven't had the chance to try this yet, but it certainly looks like an appealing option to offer.

README.md Outdated

## Permalinks
### Permalinks
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does anyone know how to fix this rendering issue? It is also present on the master branch.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the character between '##' and 'Permalinks' is not a space.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. That fixed it. :-)

@jarrodu jarrodu changed the title WIP Docker Compose Simpify local builds with Docker Compose, Also updated README Feb 22, 2018
@jarrodu jarrodu changed the title Simpify local builds with Docker Compose, Also updated README Simplify local builds with Docker Compose, Also updated README Feb 22, 2018
@ashawley
Copy link
Member

I'm sure they are interdependent, but it seems like there are at least 3 changes under consideration here:

  1. Upgrade the gems
  2. Add docker
  3. Improve the README

In the interest of getting this important work integrated rather than delayed, would it be possible to make the changes separately?

I think I have an old version of docker-compose, so it didn't work for me. I'll need to look in to upgrading.

$ ./bin/serve
WARNING: Please be aware that .yml is the expected extension in most cases, and using .yaml can cause compatibility issues in future.

ERROR: In file './docker-compose.yaml' service 'version' doesn't have any configuration options. All top level keys in your docker-compose.yml must map to a dictionary of configuration options.

@jarrodu
Copy link
Member Author

jarrodu commented Feb 22, 2018

I minimized the differences between master's and docker-compose's version of Gemfile.lock. This should make reviewing easier. Since my goal here is to make it easier and more inviting for new contributors I prefer to keep the rest of the changes in this PR. The existing contributors can continue using the workflows they are used to.

I am running Compose 1.8 which is the default if you are running Ubuntu 17.10. Version 1.19 installed using pip also works.

Copy link
Member

@jvican jvican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great because I've struggled so much to get this repo working on my local machine, that I had to install vagrant and use my own environment. Thanks for the work @jarrodu 😄

@ashawley
Copy link
Member

I minimized the differences between master's and docker-compose's version of Gemfile.lock.

Thanks, @jarrodu. That will make it easier to review.

my goal here is to make it easier and more inviting for new contributors

I'm all for this. I tried to do a small piece of that in #693, which I suspect is one of the technical hurdles that motivates using docker actually.


In this new version of the scala-lang site we've tried to follow a `pretty permalink` style, so that any generated page will have an permalink finishing in a slash character (`/`). This will tell Jekyll to build that particular page as an `index.html` inside a folder with a name as specified in the provided permalink. i.e.: if a page has a permalink as follows:
We trie to follow a [pretty permalink](https://jekyllrb.com/docs/permalinks/) style, so that any generated page will have a link finishing in a slash character (`/`). This will tell Jekyll to build that particular page as an `index.html` inside a folder with a name as specified in the provided permalink. i.e.: if a page has a permalink as follows:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We try

@propensive propensive merged commit 9bb3e3d into master Feb 23, 2018
@propensive
Copy link
Contributor

Thank you again, @jarrodu! Happy to have this contribution. :)

@propensive propensive deleted the docker-compose branch February 23, 2018 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants