Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API server to update apps / show notifications in response to webhooks #8

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
6 changes: 6 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# This is used by many apps that show the (relative) date and time.
TZ="America/Mexico_City"

## TODO: pixbyt-server
SERVER_PORT="1234"
# SERVER_USERNAME="<username>"
# SERVER_PASSWORD="<password>"
# SERVER_RUN_SCHEDULER="false"

## target-tidbyt
# Find your Device ID and API Token in the Tidbyt mobile app under Settings > General > Get API Key.
TIDBYT_DEVICE_ID="<device ID>"
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ COPY ./meltano.yml .
COPY ./plugins/utilities/ ./plugins/utilities/
COPY ./plugins/plugins.meltano.yml ./plugins/plugins.meltano.yml

# Prod: Install loaders and Airflow
# Prod: Install loaders, server, and Airflow
FROM base as prod-preinstall
RUN meltano --log-level=debug install

# Dev: Only install loaders, not Airflow
# Dev: Only install loaders, not server and Airflow
FROM base as dev-preinstall
RUN meltano --log-level=debug install loaders

Expand All @@ -53,4 +53,4 @@ COPY . .
ENV MELTANO_PROJECT_READONLY 1

ENTRYPOINT ["meltano"]
CMD ["invoke", "airflow", "scheduler"]
CMD ["invoke", "server"]
3 changes: 2 additions & 1 deletion apps/hello-world/hello-world.star
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
load("render.star", "render")
load("pixlib/const.star", "const")
load("pixlib/input.star", "input")
load("./client.star", "client")

def main(config):
NAME = config.get("name") or "world"
NAME = input.json().get("name") or config.get("name") or "world"

image = client.get_image()
text = client.get_response(NAME)
Expand Down
2 changes: 1 addition & 1 deletion apps/hello-world/pixbyt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins:
extractors:
- name: tap-pixlet--hello-world
inherit_from: tap-pixlet
pip_url: git+https://github.com/DouweM/tap-pixlet.git -r apps/hello-world/requirements.txt
pip_url: git+https://github.com/DouweM/tap-pixlet.git@input -r apps/hello-world/requirements.txt # TODO: Drop @input
config:
path: apps/hello-world
app_config:
Expand Down
24 changes: 23 additions & 1 deletion plugins/plugins.meltano.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins:
extractors:
- name: tap-pixlet
namespace: tap_pixlet
pip_url: git+https://github.com/DouweM/tap-pixlet.git
pip_url: git+https://github.com/DouweM/tap-pixlet.git@input # TODO: Drop @input
settings:
- name: path
- name: installation_id
Expand Down Expand Up @@ -31,6 +31,28 @@ plugins:
pip_url: git+https://github.com/DouweM/target-webp.git

utilities:
- name: server
namespace: pixbyt_server
pip_url: git+https://github.com/DouweM/pixbyt-server.git@0a581ff62e6d5622d13aaabfbe4a26d0340d8370 # TODO: Drop SHA
executable: pixbyt-server
settings:
- name: port
kind: integer
value: 1234
env: SERVER_PORT
- name: auth
kind: object
- name: auth.username
kind: string
env: SERVER_USERNAME
- name: auth.password
kind: password
env: SERVER_PASSWORD
- name: run_scheduler
kind: boolean
value: true
env: SERVER_RUN_SCHEDULER

- name: airflow
variant: apache
pip_url: git+https://github.com/meltano/airflow-ext.git@main apache-airflow==2.7.0 psycopg2-binary
Expand Down