{"id":13983958,"url":"https://github.com/valentin2105/deployer","last_synced_at":"2025-03-20T03:30:31.490Z","repository":{"id":57593513,"uuid":"96716187","full_name":"valentin2105/deployer","owner":"valentin2105","description":"a Go docker-compose multi-stages deployer.","archived":false,"fork":false,"pushed_at":"2018-01-21T20:48:35.000Z","size":30,"stargazers_count":23,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-17T14:02:17.503Z","etag":null,"topics":["deployment","docker","docker-compose","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/valentin2105.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-09T22:55:44.000Z","updated_at":"2025-02-11T21:33:26.000Z","dependencies_parsed_at":"2022-08-24T14:57:13.501Z","dependency_job_id":null,"html_url":"https://github.com/valentin2105/deployer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentin2105%2Fdeployer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentin2105%2Fdeployer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentin2105%2Fdeployer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentin2105%2Fdeployer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valentin2105","download_url":"https://codeload.github.com/valentin2105/deployer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244543699,"owners_count":20469543,"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":["deployment","docker","docker-compose","go","golang"],"created_at":"2024-08-09T05:02:05.283Z","updated_at":"2025-03-20T03:30:31.162Z","avatar_url":"https://github.com/valentin2105.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# deployer\n[![Build Status](https://travis-ci.org/valentin2105/deployer.svg?branch=master)](https://travis-ci.org/valentin2105/deployer)\n[![Go Report Card](https://goreportcard.com/badge/github.com/valentin2105/deployer)](https://goreportcard.com/report/github.com/valentin2105/deployer)\n[![Releases](https://coderelease.io/badge/valentin2105/deployer)](https://coderelease.io/github/repository/valentin2105/deployer)\n\n![](https://i.imgur.com/Je8FbDT.png)\n\n## Description\na Go docker-compose multi-stages deployer.\n\nUse case example[ here](https://opsnotice.xyz/deployer-multi-stage-dockercompose/\n).\n\n## Build\n\nTo build it, use `go get` and `gopm` for dependencies :\n\n```bash\n$ go get -d github.com/valentin2105/deployer\n$ go get -u github.com/gpmgo/gopm\n$ cd $GOPATH/src/github.com/valentin2105/deployer \u0026\u0026 $GOPATH/bin/gopm get \n$ cd $GOPATH/src/github.com/valentin2105/deployer \u0026\u0026 $GOPATH/bin/gopm get\n$ go build \u0026\u0026 ./deployer -h\n```\n\n## Example\n\n#### First, you need a config.json file :\n```\n{\n   “config”:\n {\n     “WpImage”: “wordpress:latest”,\n     “DBImage”: “mysql:latest”,\n     “NginxImage”: “nginx:latest”\n },\n   “dev”:\n {\n     “Tag”: “dev”,\n     “Vhost”: “dev.example.com”,\n     \"DBPassword\": \"AnyGoodPassword\",\n     \"DBName\": \"mydevsite\",\n     \"ExpositionPort\": \"8001:80\"\n },\n   “prod”:\n {\n     “Tag”: “integration”,\n     “Vhost”: “integration.example.com”,\n     \"DBPassword\": \"AnyBetterPassword\",\n     \"DBName\": \"myprodsite\",\n     \"IPv6Network\": \"ff00:c210::/64\",\n     \"IPv6\": \"ff00:c210::121\"\n }\n}\n```\n#### Then, you can create your compose/dev.tmpl.yml file :\n```\nversion: '2'\nservices:\n  wordpress:\n    image: {{.config_WpImage}}\n    ports:\n      - {{.dev_ExpositionPort}}\n    volumes:\n      - /var/www/html\n    environment:\n      WORDPRESS_DB_HOST: db\n      WORDPRESS_DB_NAME: {{.dev_DBName}}\n      WORDPRESS_DB_USER: root\n      WORDPRESS_DB_PASSWORD: {{.dev_DBPassword}}\n    depends_on:\n      - db\n    links:\n      - db\n\n  db:\n    image: {{.config_DBImage}}\n    volumes:\n      - /var/lib/mysql\n    environment:\n      MYSQL_DATABASE: {{.dev_DBName}}\n      MYSQL_ROOT_PASSWORD: {{.dev_DBPassword}}\n```\n#### Finally, you can deploy your dev environement :\n```\ndeployer add dev\n```\n\n## Usage\n\n![](http://i.imgur.com/ngkdqr0.gif)\n\n```bash\nNAME:\n   deployer\n\nUSAGE:\n   deployer [global options] command [command options] [arguments...]\n\nVERSION:\n   0.1.5\n\nAUTHOR:\n   Valentin Ouvrard\n\nCOMMANDS:\n     deploy\n     delete\n     list\n     help, h  Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h     show help\n   --version, -v  print the version\n```\n\n## Contribution\n\n1. Fork ([https://github.com/valentin2105/deployer/fork](https://github.com/valentin2105/deployer/fork))\n1. Create a feature branch\n1. Commit your changes\n1. Rebase your local changes against the master branch\n1. Run test suite with the `go test ./...` command and confirm that it passes\n1. Run `gofmt -s`\n1. Create a new Pull Request\n\n## Author\n\n[Valentin Ouvrard](https://github.com/valentin2105)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalentin2105%2Fdeployer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalentin2105%2Fdeployer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalentin2105%2Fdeployer/lists"}