Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions services/voting-node/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,24 @@ deps:
# Install package dependencies without the voting_node package
RUN poetry install --only main --no-root
RUN poetry self add poetry-plugin-export

# Copy the voting_node source code
COPY --dir voting_node README.md ./

SAVE ARTIFACT .venv .venv
SAVE IMAGE --cache-hint

lock:
FROM +builder

WORKDIR /src/services/voting-node

COPY pyproject.toml .
COPY poetry.lock .
COPY ../../utilities/ideascale-importer+build/src /src/utilities/ideascale-importer

RUN poetry lock

SAVE ARTIFACT ./poetry.lock AS LOCAL poetry.lock

# Build for distribution
build:
Expand Down
8 changes: 5 additions & 3 deletions services/voting-node/blueprint.cue
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ project: {
GVC_API_URL: value: string | *"unused"
IS_NODE_RELOADABLE: value: string | *"true"
VOTING_HOST: value: string | *"0.0.0.0"
VOTING_PORT: value: string | *"8000"
VOTING_PORT: value: string | *"8080"
VOTING_LOG_LEVEL: value: string | *"debug"
JORM_PATH: value: string | *"jormungandr"
JCLI_PATH: value: string | *"jcli"
Expand Down Expand Up @@ -123,7 +123,7 @@ project: {
}
}
ports: {
http: port: 8080
metrics: port: 8080
}
securityContext: {}
}
Expand Down Expand Up @@ -215,7 +215,9 @@ project: {
}
}

service: {}
service: {
scrape: true
}

volumes: snapshot: {
size: "1Gi"
Expand Down
23 changes: 1 addition & 22 deletions services/voting-node/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,28 +139,7 @@ export SSH_SNAPSHOT_TOOL_KEYFILE=/root/.ssh/id_snapshot
# Sleep if DEBUG_SLEEP is set
debug_sleep

# Define the command to be executed
CMD_TO_RUN="voting-node start"

# Add $* to the command so that additional flags can be passed
ARGS=$*
CMD="$CMD_TO_RUN $ARGS"

# Wait for DEBUG_SLEEP seconds if the DEBUG_SLEEP environment variable is set
if [ -n "${DEBUG_SLEEP:-}" ]; then
echo "DEBUG_SLEEP is set to ${DEBUG_SLEEP}. Sleeping..."
sleep "$DEBUG_SLEEP"
fi

echo ">>> Executing command..."
# Expand the command with arguments and capture the exit code
set +e
eval "$CMD"
EXIT_CODE=$?
set -e

# If the exit code is 0, the Python executable returned successfully
if [ $EXIT_CODE -ne 0 ]; then
echo "Error: Python executable returned with exit code $EXIT_CODE"
exit 1
fi
exec voting-node start "$@"
43 changes: 43 additions & 0 deletions services/voting-node/ideascale.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"proposals": {
"extra_field_mappings": {
"auto_translated": "auto_translated",
"brief": "challenge_brief",
"budget_breakdown": "please_provide_a_detailed_budget_breakdown",
"challenges_or_risks": "what_main_challenges_or_risks_do_you_foresee_to_deliver_this_project_successfully_",
"full_solution": "please_describe_your_proposed_solution",
"goal": "how_does_success_look_like_",
"how_solution_address_challenge": "please_describe_how_your_proposed_solution_will_address_the_challenge_",
"importance": "importance",
"metrics": "key_metrics_to_measure",
"new_proposal": "is_this_proposal_is_a_continuation_of_a_previously_funded_project_in_catalyst__or_an_entirely_new_o",
"progress_metrics": "what_will_you_measure_to_track_your_project_s_progress__and_how_will_you_measure_it_",
"relevant_link_1": "relevant_link_1",
"relevant_link_2": "website__github_repository__or_any_other_relevant_link__",
"relevant_link_3": "relevant_link_3",
"return_in_a_later_round": "if_you_are_funded__will_you_return_to_catalyst_in_a_later_round_for_further_funding__please_explain",
"sdg_rating": "sdg_rating",
"solution": "problem_solution",
"team_details": "please_provide_details_of_the_people_who_will_work_on_the_project_",
"timeline_and_key_milestones": "please_provide_a_detailed_plan__a_timeline__and_key_milestones_for_delivering_your_proposal_"
},
"field_mappings": {
"funds": [
"requested_funds",
"requested_funds_in_ada",
"requested_funds_coti"
],
"proposer_relevant_experience": "relevant_experience",
"proposer_url": [
"relevant_link_1",
"website__github_repository__or_any_other_relevant_link__",
"relevant_link_3"
],
"public_key": "ada_payment_address__"
}
},
"proposals_scores_csv": {
"id_field": "proposal_id",
"score_field": "Rating"
}
}
Loading
Loading