multi-start


Namemulti-start JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/ioxiocom/multi-start
SummaryRun multiple services inside a docker container
upload_time2024-12-03 13:43:29
maintainerNone
docs_urlNone
authorIOXIO Ltd
requires_python<4.0,>=3.10
licenseBSD-3-Clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # multi-start

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ioxiocom/multi-start/publish.yaml)](https://github.com/ioxiocom/multi-start/actions/workflows/publish.yaml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyPI](https://img.shields.io/pypi/v/multi-start)](https://pypi.org/project/multi-start/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/multi-start)](https://pypi.org/project/multi-start/)
[![License: BSD 3-Clause](https://img.shields.io/pypi/l/multi-start)](https://opensource.org/license/bsd-3-clause/)

This tool aims to help running multiple services inside a single docker container.

Sometimes you might want to have backend, frontend and nginx (or a combination of those)
inside a single container. This tool may help with:

- Prepare final Nginx configs using
  [parse-template](https://github.com/cocreators-ee/parse-template)
- Wait until backend and frontend start responding before running Nginx
- Stop every process if one of them exits so the whole container stops gracefully

## Installation

```shell
pip install multi-start
```

## Usage

```
multi-start --help

Usage: multi-start [OPTIONS]

  Run multiple services at once. Set DEBUG environment variable to 1 for more
  verbose output when running.

Options:
  --backend / --no-backend        Enable backend service  [default: no-
                                  backend]
  --backend-cmd TEXT              Command to start backend service  [default:
                                  poetry run invoke serve]
  --backend-dir TEXT              Working directory for the backend  [default:
                                  backend]
  --backend-port INTEGER          Port number that backend is running at if
                                  port is used
  --backend-socket TEXT           UNIX socket path that backend is running at
                                  if socket is used  [default:
                                  /run/nginx/uvicorn.sock]
  --frontend / --no-frontend      Enable frontend service  [default: no-
                                  frontend]
  --frontend-port INTEGER         Port number that frontend is running at
                                  [default: 3000]
  --frontend-cmd TEXT             Command to start frontend service  [default:
                                  pnpm run start]
  --frontend-dir TEXT             Working directory for the frontend
                                  [default: frontend]
  --nginx / --no-nginx            Enable nginx  [default: no-nginx]
  --nginx-cmd TEXT                Command to start Nginx  [default: nginx -g
                                  "daemon off;"]
  --service-wait-time FLOAT       How long to wait for a service to be up an
                                  running (sec)  [default: 3.0]
```

## Development

Make sure you install [pre-commit](https://pre-commit.com/#install) and run:

```shell
pre-commit install
```

For testing you can use e.g.

```shell
poetry run multi-start \
  --backend \
  --backend-dir ../another-project/src \
  --backend-cmd "poetry run invoke dev" \
  --backend-port 8080
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ioxiocom/multi-start",
    "name": "multi-start",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "IOXIO Ltd",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ac/3b/45ac6589eaaa335eed4a90a9f7a0258f06e3f6846d7900d6c79ff4bea235/multi_start-1.2.0.tar.gz",
    "platform": null,
    "description": "# multi-start\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ioxiocom/multi-start/publish.yaml)](https://github.com/ioxiocom/multi-start/actions/workflows/publish.yaml)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![PyPI](https://img.shields.io/pypi/v/multi-start)](https://pypi.org/project/multi-start/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/multi-start)](https://pypi.org/project/multi-start/)\n[![License: BSD 3-Clause](https://img.shields.io/pypi/l/multi-start)](https://opensource.org/license/bsd-3-clause/)\n\nThis tool aims to help running multiple services inside a single docker container.\n\nSometimes you might want to have backend, frontend and nginx (or a combination of those)\ninside a single container. This tool may help with:\n\n- Prepare final Nginx configs using\n  [parse-template](https://github.com/cocreators-ee/parse-template)\n- Wait until backend and frontend start responding before running Nginx\n- Stop every process if one of them exits so the whole container stops gracefully\n\n## Installation\n\n```shell\npip install multi-start\n```\n\n## Usage\n\n```\nmulti-start --help\n\nUsage: multi-start [OPTIONS]\n\n  Run multiple services at once. Set DEBUG environment variable to 1 for more\n  verbose output when running.\n\nOptions:\n  --backend / --no-backend        Enable backend service  [default: no-\n                                  backend]\n  --backend-cmd TEXT              Command to start backend service  [default:\n                                  poetry run invoke serve]\n  --backend-dir TEXT              Working directory for the backend  [default:\n                                  backend]\n  --backend-port INTEGER          Port number that backend is running at if\n                                  port is used\n  --backend-socket TEXT           UNIX socket path that backend is running at\n                                  if socket is used  [default:\n                                  /run/nginx/uvicorn.sock]\n  --frontend / --no-frontend      Enable frontend service  [default: no-\n                                  frontend]\n  --frontend-port INTEGER         Port number that frontend is running at\n                                  [default: 3000]\n  --frontend-cmd TEXT             Command to start frontend service  [default:\n                                  pnpm run start]\n  --frontend-dir TEXT             Working directory for the frontend\n                                  [default: frontend]\n  --nginx / --no-nginx            Enable nginx  [default: no-nginx]\n  --nginx-cmd TEXT                Command to start Nginx  [default: nginx -g\n                                  \"daemon off;\"]\n  --service-wait-time FLOAT       How long to wait for a service to be up an\n                                  running (sec)  [default: 3.0]\n```\n\n## Development\n\nMake sure you install [pre-commit](https://pre-commit.com/#install) and run:\n\n```shell\npre-commit install\n```\n\nFor testing you can use e.g.\n\n```shell\npoetry run multi-start \\\n  --backend \\\n  --backend-dir ../another-project/src \\\n  --backend-cmd \"poetry run invoke dev\" \\\n  --backend-port 8080\n```\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Run multiple services inside a docker container",
    "version": "1.2.0",
    "project_urls": {
        "Homepage": "https://github.com/ioxiocom/multi-start",
        "Repository": "https://github.com/ioxiocom/multi-start"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f2d56309ecaa63044606f9105c2b1edad63e4dd1859410704f1a57c182e9e4d7",
                "md5": "7076ee877dcd515fcfdd32aaa0904827",
                "sha256": "d43a5a94ead3ae4a41ebfaf7df11fed659687c06e21ab090bdd3798441c23bed"
            },
            "downloads": -1,
            "filename": "multi_start-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7076ee877dcd515fcfdd32aaa0904827",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 7137,
            "upload_time": "2024-12-03T13:43:29",
            "upload_time_iso_8601": "2024-12-03T13:43:29.036040Z",
            "url": "https://files.pythonhosted.org/packages/f2/d5/6309ecaa63044606f9105c2b1edad63e4dd1859410704f1a57c182e9e4d7/multi_start-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ac3b45ac6589eaaa335eed4a90a9f7a0258f06e3f6846d7900d6c79ff4bea235",
                "md5": "667ef1cb548aa311dced9e7d22040055",
                "sha256": "721331e50904ee63fb0439fb02940dab5787e9973b8a884520ada79b95395114"
            },
            "downloads": -1,
            "filename": "multi_start-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "667ef1cb548aa311dced9e7d22040055",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 5865,
            "upload_time": "2024-12-03T13:43:29",
            "upload_time_iso_8601": "2024-12-03T13:43:29.901309Z",
            "url": "https://files.pythonhosted.org/packages/ac/3b/45ac6589eaaa335eed4a90a9f7a0258f06e3f6846d7900d6c79ff4bea235/multi_start-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-03 13:43:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ioxiocom",
    "github_project": "multi-start",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "multi-start"
}
        
Elapsed time: 0.35621s