{"id":21405888,"url":"https://github.com/anamba/awdwr-docker","last_synced_at":"2026-04-16T11:31:16.599Z","repository":{"id":144807095,"uuid":"115763849","full_name":"anamba/awdwr-docker","owner":"anamba","description":"Go through the AWDWR book without having to install anything locally (i.e., you can skip chapter 1).","archived":false,"fork":false,"pushed_at":"2017-12-31T01:32:35.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T17:49:14.282Z","etag":null,"topics":["awdwr-book","docker","rails","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anamba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-30T00:38:20.000Z","updated_at":"2017-12-31T01:47:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"b779bb8a-2966-46b5-9074-f98f35f585db","html_url":"https://github.com/anamba/awdwr-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anamba/awdwr-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anamba%2Fawdwr-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anamba%2Fawdwr-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anamba%2Fawdwr-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anamba%2Fawdwr-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anamba","download_url":"https://codeload.github.com/anamba/awdwr-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anamba%2Fawdwr-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31883697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T09:23:21.276Z","status":"ssl_error","status_checked_at":"2026-04-16T09:23:15.028Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awdwr-book","docker","rails","ruby","ruby-on-rails"],"created_at":"2024-11-22T16:28:55.052Z","updated_at":"2026-04-16T11:31:16.577Z","avatar_url":"https://github.com/anamba.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker environment for AWDWR 5.1\nGo through the AWDWR book without having to install anything locally (i.e., you can skip chapter 1).\n\n## What you get\nThe equivalent of following the Linux instructions in Chapter 1. Namely:\n\n* Ubuntu 16.04 LTS\n* Ruby 2.4 via rvm + latest bundler and rails 5.1 gems\n* Node 8.x, yarn\n* Apt packages: libmysqlclient-dev mysql-client chromium-chromedriver\n\nAdditionally, it includes all the gems included in the default bundle (when you run `rails new \u003cappname\u003e`). This setup is very simple, and will likely be far too slow for everyday use on an actual, real-world Rails project (to fix that, see http://docker-sync.io/), but it is perfect for trying out the sample code in the AWDWR book.\n\n## How to use\n\n1. Install Docker for Mac, give it access to at least 2 CPUs and 2 GB RAM.\n2. Clone this repo to your local machine and cd to the cloned dir\n3. Run `docker-compose up`\n4. Do stuff! (See \"Running commands inside the container\" below.)\n5. When you're done, hit Ctrl-C (once) and the containers will shut down.\n6. If you actually want to destroy the containers, run `docker-compose down`.\n\nUsing Docker is a bit like using Cloud9 (indeed, the original Cloud9 service referenced by the book used Docker containers internally), so when you see references to c9 in the book, they will often apply to this setup as well (for example, the web console fix on p.58).\n\n## Running commands inside the container\n1. In a separate terminal window, cd to the cloned dir\n2. Run `docker-compose exec -u app web bash -l`  (protip: make a shell alias for this)\n3. If you need a root shell: `docker-compose exec web bash -l`\n\n## Differences vs. the book\nThis section is very incomplete (pull requests welcome).\n\n* Rails 5.1.4 has been released, so we'll use that instead of 5.1.3. Other minor gem updates are also included.\n* p.48: `bin/rails server -b 0.0.0.0` will not enable the server to be accessible from other machines on your network.\n\n## Optional: MariaDB/MySQL\nAlthough the book sticks with sqlite for the most part, it's easy to switch to MariaDB. (If you aren't familiar with MariaDB, it is a fork of MySQL that maintains compatibility, and even uses the same commands and file names.)\n\n1. Uncomment the links: section (two lines) under services -\u003e web\n2. Uncomment the the db: section (four lines) at the bottom\n3. Run `docker-compose up` as usual, and this time MariaDB will start.\n\nOf course, you can use actual MySQL if you want. Just change the image line in docker-compose.yml:\n    image: mariadb:10.2.11\n\nto something like this:\n    image: mysql:5.7.20\n\n### Database management\nTwo helpful utilities are included to dump and load databases.\n\n* to dump a database: `docker/bin/dump-db \u003cdatabase name\u003e`\n* to load a database backup: `docker/bin/load-db \u003cdatabase name\u003e \u003cdump filename\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanamba%2Fawdwr-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanamba%2Fawdwr-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanamba%2Fawdwr-docker/lists"}