Add support for `.service` file
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with manage_apps.py and deploy.sh, tracing the existing APP and METHOD environment-variable flow. Review the proposed SERVICEFILEPATH handling and connection.serviceExists checks, then follow how deploy.sh invokes manage_apps.py. Done means a .service file is recognized during deploy previews and the described service checks and creation flow works for applications needing services such as Redis or Postgres.
Written by the indexing model from the issue text.
Description
For applications which require services like Redis or Postgres, a standard file (probably .service) would be useful to recognize and automatically spin up those services for the app. This is especially useful as part of the deploy preview, which would be frustrating to use for now for apps which depend on those resources.
We can accomplish this with logic along the lines of:
SERVICE_FILEPATH = os.environ.get("SERVICEFILEPATH")
METHOD = os.environ.get("METHOD")
if SERVICE_FILEPATH:
with open(SERVICE_FILEPATH, 'r') as svc_file:
service_configs = json.load(svc_file)
if not isinstance(service_configs, list):
service_configs = [service_configs]
if METHOD == "CHECKSVC":
for service in service_configs:
push = "false" if connection.serviceExists(APP, service['type']) else "true"
if push == "true":
print(push)
in manage_apps.py and logic along the lines of:
# Check if service needs to be created
if [[ -f "$APPS_DIR/$APP/.service" ]]; then
service_file="$APPS_DIR/$APP/.service"
create_svc=true
fi
if [[ "$create_svc" == "true" ]]; then
APP=$with_suffix METHOD="CREATESVC" SERVICEFILEPATH=$service_file python ./manage_apps.py
fi
in deploy.sh.
- Dominant language
- No language data
- Stars
- 4
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plotly/de-deploy
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Add support for DE4 Open
All issues in plotly/de-deploy
Similar issues
-
kb-infra-drift
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OCHA-DAP/ds-knowledge-base#653 · 1 comment ·
-
intake mcp-intake needs-ac needs-human-review priority:medium type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Ikalus1988/MisakaNet#2102 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
llvm/lighthouse#283 ·
-
🤔 refinement needed
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
equinor/radix-operator#1979 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100