{"id":22289497,"url":"https://github.com/florian-vuillemot/weblodge","last_synced_at":"2025-07-28T23:30:33.926Z","repository":{"id":179832052,"uuid":"655374400","full_name":"florian-vuillemot/weblodge","owner":"florian-vuillemot","description":"A simple command line aiming to provide anyone with deployment and cloud management capabilities.","archived":true,"fork":false,"pushed_at":"2024-02-26T04:12:48.000Z","size":259,"stargazers_count":2,"open_issues_count":8,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T00:37:50.871Z","etag":null,"topics":["azure","deployment","devops"],"latest_commit_sha":null,"homepage":"","language":"Python","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/florian-vuillemot.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}},"created_at":"2023-06-18T17:45:17.000Z","updated_at":"2024-11-14T19:25:02.000Z","dependencies_parsed_at":"2023-10-26T18:32:17.823Z","dependency_job_id":null,"html_url":"https://github.com/florian-vuillemot/weblodge","commit_stats":null,"previous_names":["florian-vuillemot/weblodge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/florian-vuillemot/weblodge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florian-vuillemot%2Fweblodge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florian-vuillemot%2Fweblodge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florian-vuillemot%2Fweblodge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florian-vuillemot%2Fweblodge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/florian-vuillemot","download_url":"https://codeload.github.com/florian-vuillemot/weblodge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florian-vuillemot%2Fweblodge/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265419694,"owners_count":23761858,"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":["azure","deployment","devops"],"created_at":"2024-12-03T17:09:17.044Z","updated_at":"2025-07-28T23:30:33.514Z","avatar_url":"https://github.com/florian-vuillemot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebLodge\n\n**WebLodge** is a command line aiming to provide anyone with deployment and cloud management capabilities.\n\n\u003e Full documentation [here](https://weblodge.readthedocs.io/en/latest/).\n\n\n## Prerequisites\n\n- Install the command line with `pip install weblodge`.\n- A Python [Flask](https://flask.palletsprojects.com/en/2.3.x/) application.\n- A `requirements.txt` with the application dependencies. \n- Have an [Azure account](https://azure.microsoft.com/en-us/free).\n\n\u003e Note: By default, **WebLodge** uses **Free** (or almost free) [Azure services](https://azure.microsoft.com/en-us/pricing/free-services) and lets the user specify non-free configurations.\n\n\n\u003e Note: Today, **WebLodge** is only available for **Flask** applications.\n\n\n## Deploying an application\n\nThe simple way to deploy your local application is by running the command line `weblodge deploy --build` in your application directory.\n\nIn that case, **WebLodge** will assume that your application entry point is named `app.py` and your dependencies file is `requirements.txt`.\n\nBehind the scene, **WebLodge** *build* then *deploy* your application.\n\n![CLI: weblodge deploy --build](./images/deploy.gif)\n\n## Application structure\n\n**WebLodge** is sensible to the application structure. Applications must follow the pre-defined pattern or specify custom values.\n\nHere is an example of the standard pattern deployable without configuration:\n```\n$ cat app.py  # The application entry point.\nfrom flask import Flask\n\napp = Flask(__name__)  # The Flask application.\n\n@app.route(\"/\")\ndef hello_world():\n    return \"\u003cp\u003eHello, World!\u003c/p\u003e\"\n```\nIt can be deployed with `weblodge deploy --build`.\n\nHere is a non-standard example:\n```\n$ cat main.py  # The application entry point.\nfrom flask import Flask\n\nmy_app = Flask(__name__)  # The Flask application.\n\n@app.route(\"/\")\ndef hello_world():\n    return \"\u003cp\u003eHello, World!\u003c/p\u003e\"\n```\nTo be able to deploy the application, you must first *build* it and specify:\n- The entry point file: `main.py`.\n- The **Flask** application: `my_app`.\n```\n# Build the application.\nweblodge build --entry-point main.py --flask-app my_app\n# Deploy the application.\nweblodge deploy\n```\n\n## Build\n\nThe *build* operation collects and prepares the application for deployment on a specific platform.\n\nThe *build* operation can handle the following options:\n| Option name | Description | Default value |\n|-|-|-|\n| src | Folder containing application sources. | `.` |\n| dist | Folder containing the application built. | `dist` |\n| entry-point | The application file to be executed with `python`. | `app.py` |\n| flask-app | The Flask application object in the `entry-point` file. | `app` |\n| requirements | The **requirements.txt** file path of the application. Ignores if a `requirements.txt` file is located at the root of the application. | `requirements.txt` |\n\n\u003e Note: Here, the platform is implicitly [Azure App Service](https://azure.microsoft.com/en-us/products/app-service/web).\n\nExample:\n```\n# Build the local application.\nweblodge build\n\n# Build the application in the 'myapp' folder.\nweblodge build --src myapp\n```\n\n## Deploy\n\nThe *deploy* operation creates the necessary infrastructure and uploads the build package - i.e. your code - on the infrastructure.\n\n| Option name | Description | Default value |\n|-|-|-|\n| subdomain | The subdomain of the application on the Internet: `\u003csubdomain\u003e.azurewebsites.net`. Randomly generated if not provided. | `\u003crandomly generated\u003e` |\n| sku | The application [computational power](https://azure.microsoft.com/en-us/pricing/details/app-service/linux/). | `F1` |\n| location | The physical application location. | `northeurope` |\n| environment | The environment of your application. | `production` |\n| dist | Folder containing the application built. | `dist` |\n\nExample:\n```\n# Deploy the local application.\nweblodge deploy\n\n# Deploy the local application with a custom subdomain.\nweblodge deploy --subdomain myapp\n```\n\n\u003e **ℹ️ Note**\n\u003e\n\u003e WebLodge considers the `subdomain` as the application name.\n\n## Delete\n\nThe *delete* operation deletes the infrastructure deployed but keeps the build.\n\n| Option name | Description | Default value |\n|-|-|-|\n| subdomain | The subdomain of the application to be deleted. | `\u003cmy-subdomain\u003e` |\n| yes | Do not prompt a validation message before deletion. | `false` |\n\n\nExample:\n```\n# Delete the application previously deployed.\nweblodge delete\n```\n\n\n## Logs\n\nThe *logs* operation streams your application logs. Because it is a stream, logs are truncated.\n\n| Option name | Description | Default value |\n|-|-|-|\n| subdomain | The subdomain of the application. | `\u003cmy-subdomain\u003e` |\n\nExample:\n```\n# Print logs of the application previously created.\nweblodge logs\n```\n\n*** Log buffering ***\n\nLogs can be buffered and never appear in the stream.\n\nIf you use the [print](https://docs.python.org/3/library/functions.html#print) method, you can force logs to be written to the console by sending them to the [stderr](https://docs.python.org/3/library/sys.html#sys.stderr) output or by using the `flush` option.\n\nIf you use the [logging](https://docs.python.org/3/library/logging.html) module, only logs starting at the `WARNING` level will be displayed by default. Otherwise, update the [logging level](https://docs.python.org/3/library/logging.html#logging.Logger.setLevel) module to the required level.\n\n## Configuration file: `.weblodge.json`\n\nAt the end of a deployment, **WebLodge** creates a file named `.weblodge.json` by default.\nThis file contains the previous configuration, enabling **WebLodge** to update your application with the same parameters. This file can be version-controlled and used in your Continuous Deployment.\n\nYou can change the name of this file with the `--config-file` option.\n\nExample:\n```\nweblodge build --config-file myconfigfile.json\n```\n\n## Manage your WebLodge-deployed application\n\nManaging and updating is a daily infrastructure task with no visible value for the end user.\n**WebLodge** uses an Azure [Platform as a Service](https://azure.microsoft.com/en-in/resources/cloud-computing-dictionary/what-is-paas/)\nresource named [Azure App Service](https://learn.microsoft.com/en-us/azure/app-service/)\nto keep your infrastructure as secure, up-to-date and reliable as possible.\nThis tool keeps your infrastructure at the state-of-the-art, allowing you to focus on your application's functionality.\n\nBut whatever your infrastructure tools are, it's your responsibility to keep your application secure and your dependencies up-to-date.\n\n## Feedbacks\n\nFeel free to create issues with bugs, ideas and any constructive feedback.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorian-vuillemot%2Fweblodge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflorian-vuillemot%2Fweblodge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorian-vuillemot%2Fweblodge/lists"}