multi-start


Namemulti-start JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/ioxiocom/multi-start
SummaryRun multiple services inside a docker container
upload_time2024-02-05 10:18:23
maintainer
docs_urlNone
authorIOXIO Ltd
requires_python>=3.10,<4.0
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": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "IOXIO Ltd",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/c8/56/0b3efef08706a80dea24b26ccb5ba48dba9508db0e37e11ffa057b602c2c/multi_start-1.1.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.1.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": "b25e5ff21247e8a7ed6ebd540ab6c65d5757f300a41a615b3ae7b39b6bcb8ad9",
                "md5": "0a3ee6d2c3b0c2e69e616ab0f80fadaa",
                "sha256": "898a9efeb4546fb3dcd47941b860a839b66b25ea906ebdb32c7d6af1bc9f14df"
            },
            "downloads": -1,
            "filename": "multi_start-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0a3ee6d2c3b0c2e69e616ab0f80fadaa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 6987,
            "upload_time": "2024-02-05T10:18:17",
            "upload_time_iso_8601": "2024-02-05T10:18:17.065517Z",
            "url": "https://files.pythonhosted.org/packages/b2/5e/5ff21247e8a7ed6ebd540ab6c65d5757f300a41a615b3ae7b39b6bcb8ad9/multi_start-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c8560b3efef08706a80dea24b26ccb5ba48dba9508db0e37e11ffa057b602c2c",
                "md5": "2313b80a6226ca1940725fc20f632d95",
                "sha256": "21e0c3359f9eb6b818ee536e9d3ed55c400b073ffa41d19903460af8ba63468f"
            },
            "downloads": -1,
            "filename": "multi_start-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2313b80a6226ca1940725fc20f632d95",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 5721,
            "upload_time": "2024-02-05T10:18:23",
            "upload_time_iso_8601": "2024-02-05T10:18:23.360319Z",
            "url": "https://files.pythonhosted.org/packages/c8/56/0b3efef08706a80dea24b26ccb5ba48dba9508db0e37e11ffa057b602c2c/multi_start-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-05 10:18:23",
    "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.17700s