{"id":17996750,"url":"https://github.com/zk/tug","last_synced_at":"2026-01-18T16:32:27.236Z","repository":{"id":22317582,"uuid":"25652866","full_name":"zk/tug","owner":"zk","description":"Docker development workflow","archived":false,"fork":false,"pushed_at":"2014-10-23T20:25:00.000Z","size":392,"stargazers_count":0,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T17:28:20.823Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-23T18:54:49.000Z","updated_at":"2018-04-03T14:37:26.000Z","dependencies_parsed_at":"2022-08-05T17:15:19.260Z","dependency_job_id":null,"html_url":"https://github.com/zk/tug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk%2Ftug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk%2Ftug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk%2Ftug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk%2Ftug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zk","download_url":"https://codeload.github.com/zk/tug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247128753,"owners_count":20888235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-29T21:15:43.532Z","updated_at":"2026-01-18T16:32:27.230Z","avatar_url":"https://github.com/zk.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# tug\n\nUse Docker for development\n\n## Prerequisites\n\n* [Docker][docker] \u003e= 1.3\n* [Golang][golang] \u003e= 1.3\n* Working `DOCKER_HOST` (non-Linux users see [boot2docker](http://boot2docker.io/))\n\n## Installation\n\n    $ go get github.com/nitrous-io/tug\n    \n## Create a Tugfile\n\n    web:      bin/web -p $PORT\n    postgres: docker/postgres:9.3.5\n    redis:    docker/redis:2.8.9\n\nIf any command starts with `docker/` the rest will be interpreted as a docker image tag.\n\n## Start the app\n\n    $ tug start\n    postgres | fixing permissions on existing onesory /var/lib/postgresql/data ... ok\n    postgres | creating subdirectories ... ok\n    postgres | selecting default max_connections ... 100\n    postgres | selecting default shared_buffers ... 128MB\n    web      | listening on 0.0.0.0:5000\n\n## Container linking\n\nTug will set environment variables in the Docker [container linking format](https://docs.docker.com/userguide/dockerlinks/#environment-variables), like this:\n\n    POSTGRES_PORT_5432_TCP=tcp://127.0.0.1:5000\n    POSTGRES_PORT_5432_TCP_PROTO=tcp\n    POSTGRES_PORT_5432_TCP_ADDR=127.0.0.1\n    POSTGRES_PORT_5432_TCP_PORT=5000\n\n##### Aliasing ENV vars\n\nIf your application expects env vars to be named differently, alias them in your `Tugfile`:\n\n    web: env DATABASE_HOST=$POSTGRES_PORT_5432_ADDR bin/web\n\n## Dockerfile\n\nIf your app has a `Dockerfile`, tug will use it to build and run your app in [Docker][docker] while setting up appropriate port forwarding and file synchronization.\n\nFor Tug to work most effectively your `Dockerfile` should include the following:\n\n* The listening web port should be specified with an `EXPOSE` statement\n* The app's code should be included from the local directory using an `ADD` statement\n* The app's startup command should be defined using `CMD`\n\n##### Example Dockerfile\n\n\u003cpre\u003e\nFROM ruby:2.1.2\n\nENV PORT 3000\n\u003cb\u003eEXPOSE 3000\u003c/b\u003e\n\nWORKDIR /app\n\u003cb\u003eADD . /app\u003c/b\u003e\n\n\u003cb\u003eCMD [\"bundle\", \"exec\", \"unicorn\", \"-p\", \"$PORT\"]\u003c/b\u003e\n\u003c/pre\u003e\n\n[docker]: https://www.docker.com/whatisdocker/\n[golang]: http://golang.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzk%2Ftug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzk%2Ftug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzk%2Ftug/lists"}