{"id":15791387,"url":"https://github.com/levonet/ansible-docker-project-deploy","last_synced_at":"2026-03-18T16:44:36.479Z","repository":{"id":67322360,"uuid":"146216431","full_name":"levonet/ansible-docker-project-deploy","owner":"levonet","description":"Ansible role that deploys some project to docker","archived":false,"fork":false,"pushed_at":"2019-03-30T00:01:11.000Z","size":16,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-11T23:04:58.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/levonet/docker_project_deploy","language":null,"has_issues":true,"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/levonet.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-26T21:05:50.000Z","updated_at":"2022-05-08T22:37:52.000Z","dependencies_parsed_at":"2023-02-21T20:45:52.170Z","dependency_job_id":null,"html_url":"https://github.com/levonet/ansible-docker-project-deploy","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/levonet/ansible-docker-project-deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fansible-docker-project-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fansible-docker-project-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fansible-docker-project-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fansible-docker-project-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levonet","download_url":"https://codeload.github.com/levonet/ansible-docker-project-deploy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Fansible-docker-project-deploy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263853516,"owners_count":23520162,"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-04T23:00:46.824Z","updated_at":"2026-02-04T03:04:24.340Z","avatar_url":"https://github.com/levonet.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# CI: Deploy docker project Role\n[![Build Status](https://travis-ci.org/levonet/ansible-docker-project-deploy.svg?branch=master)](https://travis-ci.org/levonet/ansible-docker-project-deploy)\n\nDeploy project in a docker container.\n\n## Role Variables\n\n- `project_tag` (default: latest): Tag name.\n- `project_host` (default: 127.0.0.1): Host for binding app port on docker server.\n- `project_port` (default: 8080): Binding app port on docker server. Ignored if used `project_port_pool`.\n- `project_app_port` (default: 8080): Exposed port in docker container.\n- `project_port_pool` (optional): Ports pool.\n- `project_name` (required): This name used in name of home folder path, hostname and in name of container.\n- `project_hostname` (default: \"{{ project_tag }}.{{ project_name }}.localhost\")\n- `nginx_conf_prefix` (default: 50-): Prefix in name of nginx config.\n- `nginx_include_root_location` (default: yes) Include root location section with proxy_pass on service.\n- `nginx_include_ssl` (default: no): Include ssl configuration.\n- `nginx_only_ssl` (default: no): Redirect to https from http.\n- `nginx_logs` (default: yes): Switch on/off logging.\n- `nginx_http_conf` (optional): Extra configuration for app nginx `http` section.\n- `nginx_server_conf` (optional): Extra configuration for app nginx `server` section.\n- `nginx_location_conf` (optional): Extra configuration for app nginx `location` section.\n- `nginx_test_command` (default: nginx -t)\n- `nginx_reload_command` (default: nginx -s reload)\n- `registry_username` (optional): Docker registry username.\n- `registry_password` (optional): Docker registry password.\n- `registry_hostname` (default: localhost): Docker registry address.\n- `registry_container` (required): Image name in registry.\n- `docker_project_image` (default: \"{{ registry_hostname }}/{{ registry_container }}:{{ project_tag }}\")\n- `docker_project_name` (default: \"{{ project_name }}-{{ project_tag }}\")\n- `docker_project_home` (default: \"/opt/{{ docker_project_name }}\")\n- `docker_project_command` (optional) Command to execute when the container starts.\n- `docker_project_env` (optional)\n- `docker_project_directory_mode` (default: 0755)\n- `docker_project_directory_owner` (default: root)\n- `docker_project_directory_group` (default: root)\n- `docker_project_directory_volumes` (optional)\n- `docker_project_file_volumes` (optional)\n- `docker_project_ports` (optional): Additional applications ports.\n- `docker_project_network_mode` (default: host): Connect the container to a network.\n- `docker_project_networks` (optional): List of networks the container belongs to.\n- `docker_project_log_driver` (default: json-file): Specify the logging driver.\n- `docker_project_log_options` (optional): Dictionary of options specific to the chosen log_driver. See [Configure logging drivers](https://docs.docker.com/engine/admin/logging/overview/) for details.\n- `docker_project_restart` (default: no): Restart container.\n- `docker_project_remove_existing_container`: (default: yes): Remove existing container and artifacts.\n\n## Dependencies\n\n- `docker` or `docker-ce`\n- `nginx`\n\n## Example Playbook\n\n```yaml\n- hosts: all\n  become: yes\n  become_method: sudo\n  vars:\n    project_tag: PR-21\n    project_name: my_app\n    project_app_port: 5000\n    project_port_pool: 5800-5899\n    project_hostname: \"{{ project_tag }}.{{ project_name }}.myhost.com\"\n    docker_project_directory_owner: 1001\n    docker_project_directory_group: 1001\n    docker_project_directory_volumes:\n    - \"{{ docker_project_home }}/conf:/app/config:ro\"\n    - \"{{ docker_project_home }}/storage:/app/storage\"\n    project_configs:\n    - dest: \"{{ docker_project_home }}/conf/app.ini\"\n      content: |\n        [server]\n        root_url = {{ project_hostname }}\n    nginx_conf_prefix: 35-\n    registry_hostname: registry.myhost.com\n    registry_container: my_org/my_app\n    registry_username: ci-bot\n    registry_password: secret\n  roles:\n    - role: levonet.docker_project_deploy\n```\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n\n## Author Information\n\nThis role was created by [Pavlo Bashynskyi](https://github.com/levonet)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevonet%2Fansible-docker-project-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevonet%2Fansible-docker-project-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevonet%2Fansible-docker-project-deploy/lists"}