closer to a full instrumentation stack

This commit is contained in:
2024-12-07 17:05:02 -06:00
parent 7a29dbd3c7
commit eb2f116d7b
18 changed files with 52 additions and 84 deletions

View File

@@ -0,0 +1,11 @@
services:
influxdbV1:
image: influxdb:1.8.4
container_name: reachableceo-health-data
ports:
- "8086:8086"
volumes:
- reachableceo-health-data:/var/lib/influxdb
restart: unless-stopped
volumes:
reachableceo-health-data:

9
inprep/cleanslate/.env Normal file
View File

@@ -0,0 +1,9 @@
AUTHENTICATION_SERVER_PORT=3001
CLIENT_PORT=2010
HASURA_GRAPHQL_ADMIN_SECRET=first-long-secret-value
HASURA_GRAPHQL_JWT_SECRET='{"type":"HS256","key":"11111-22222-33333-second-long-secret-value"}'
HASURA_PORT=8080
JWT_SIGNING_SECRET=second-long-secret-value
NEXT_PUBLIC_HASURA_DOMAIN=tsys1
POSTGRES_PASSWORD=1234
POSTGRES_PORT=20101

View File

@@ -0,0 +1,91 @@
services:
cleanslate-database:
image: postgres:15
restart: always
container_name: cleanslate-database
ports:
- '20101:5432'
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- cleanslate-database:/var/lib/postgresql/data
healthcheck:
test: [ 'CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
timeout: 5s
retries: 5
cleanslate-graphql-server:
image: hasura/graphql-engine:latest.cli-migrations-v3
restart: always
container_name: cleanslate-graphql-server
ports:
- '20102:8080'
environment:
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
HASURA_GRAPHQL_CORS_DOMAIN: https://${NEXT_PUBLIC_HASURA_DOMAIN}
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD}@cleanslate-database:5432/postgres
HASURA_GRAPHQL_DEV_MODE: false
HASURA_GRAPHQL_ENABLE_CONSOLE: true
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_JWT_SECRET: ${HASURA_GRAPHQL_JWT_SECRET}
volumes:
- cleanslate-migrations:/hasura-migrations
- cleanslate-metadata:/hasura-metadata
depends_on:
cleanslate-database:
condition: service_healthy
extra_hosts:
- 'host.docker.internal:host-gateway'
cleanslate-authentication-server:
image: ghcr.io/successible/cleanslate/authentication-server:latest
build:
context: .
dockerfile: Dockerfile.server
pull_policy: ${PULL_POLICY:-always}
restart: always
container_name: cleanslate-authentication-server
ports:
- '20103:3001'
environment:
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
JWT_SIGNING_SECRET: ${JWT_SIGNING_SECRET}
NEXT_PUBLIC_USE_FIREBASE: ${NEXT_PUBLIC_USE_FIREBASE:-false}
depends_on:
- cleanslate-database
- cleanslate-graphql-server
extra_hosts:
- 'host.docker.internal:host-gateway'
cleanslate-client:
image: ghcr.io/successible/cleanslate/client:latest
build:
context: .
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_FIREBASE_CONFIG=${NEXT_PUBLIC_FIREBASE_CONFIG:-{}}
- NEXT_PUBLIC_LEGAL_LINK=${NEXT_PUBLIC_LEGAL_LINK:-no}
- NEXT_PUBLIC_LOGIN_WITH_APPLE=${NEXT_PUBLIC_LOGIN_WITH_APPLE:-no}
- NEXT_PUBLIC_LOGIN_WITH_FACEBOOK=${NEXT_PUBLIC_LOGIN_WITH_FACEBOOK:-no}
- NEXT_PUBLIC_LOGIN_WITH_GITHUB=${NEXT_PUBLIC_LOGIN_WITH_GITHUB:-no}
- NEXT_PUBLIC_LOGIN_WITH_GOOGLE=${NEXT_PUBLIC_LOGIN_WITH_GOOGLE:-no}
- NEXT_PUBLIC_REACT_SENTRY_DSN=${NEXT_PUBLIC_REACT_SENTRY_DSN:-no}
- NEXT_PUBLIC_USE_FIREBASE=${NEXT_PUBLIC_USE_FIREBASE:-false}
- NEXT_PUBLIC_VERSION=${NEXT_PUBLIC_VERSION}
pull_policy: ${PULL_POLICY:-always}
restart: always
container_name: cleanslate-client
ports:
- '2010:3000'
depends_on:
- cleanslate-database
- cleanslate-graphql-server
extra_hosts:
- 'host.docker.internal:host-gateway'
volumes:
cleanslate-database:
cleanslate-migrations:
cleanslate-metadata:

View File

@@ -0,0 +1,66 @@
[logger]
level = DEBUG
[cron]
hourly_pull = False
[settings]
password =
# Restart is required after connecting to spotify via settings page for stream to start working
[spotify]
client_id =
client_secret =
redirect_uri =
# Range of % complete song needs to be in when changed to be considered a 'Skip'. Used to train model for 'liked' songs
skip_min_threshold = .05
skip_max_threshold = .80
# Min seconds song has to be on player for it to be inserted into db (ignore quick skips)
min_secs_listened = 15
# interval at which spotify 'currently_playing' will be polled, .5 = 2 requests per second
poll_interval_seconds = .5
[peloton]
username =
password =
[stryd]
username =
password =
compare_against_age=1
compare_against_gender=1
compare_against_race_event=1
[strava]
activities_after_date = 2018-01-01T00:00:00Z
client_id =
client_secret =
redirect_uri = http://127.0.0.1:8050/settings?strava
[oura]
redirect_uri = http://127.0.0.1:8050/settings?oura
client_id =
client_secret =
days_back = 7
white = rgb(220, 220, 220)
teal = rgb(134, 201, 250)
light_blue = rgb(85, 139, 189)
dark_blue = rgb(43, 70, 119)
orange = rgb(234, 109, 95)
[withings]
redirect_uri = http://127.0.0.1:8050/settings?withings
client_id =
client_secret =
[nextcloud]
url =
username =
password =
fitbod_path =
[timezone]
timezone = America/New_York
[dashboard]
transition=2000

Binary file not shown.

View File

@@ -0,0 +1,2 @@
[2024-12-07 14:46:20,490] DEBUG from spotifyAPI line 561 - Parser thread started
[2024-12-07 14:46:20,835] ERROR from stravaApi line 23 - 'NoneType' object has no attribute 'tokens'

View File

@@ -0,0 +1,16 @@
version: '3'
services:
fitly:
image: ethanopp/fitly:latest
container_name: fitly
restart: always
ports:
- "3000:80"
environment:
- MODULE_NAME=src.fitly.app
- VARIABLE_NAME=server
- TZ=America/Chicago
- TIMEOUT=1200
- DASH_DEBUG=true
volumes:
- ./config:/app/config

5
inprep/metrics/README.md Normal file
View File

@@ -0,0 +1,5 @@
https://github.com/lowlighter/metrics/blob/master/.github/readme/partials/documentation/setup/web.md
Not currently working. Was working before converting to docker-compose.
Not a high priority as it can be run on demand to generate output for use when needed.

View File

@@ -0,0 +1,10 @@
services:
reachableceo-metrics:
image: ghcr.io/lowlighter/metrics:latest
container_name: reachableceo-metrics
entrypoint: [""]
command: ["npm", "start"]
ports:
- "0.0.0.0:2002:3000"
volumes:
- "./settings.json:/metrics/settings.json"

23
inprep/metrics/metrics.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
#i hope i can make this work
# it runs and it works in offstage but not here...
#hmm this worked in the other account..
# Select an existing docker image tag
VERSION=latest
# Path to configured `settings.json`
SETTINGS=./settings.json
# Port used internally (use the same one than in `settings.json`)
SERVICE_PORT=3000
# Port to publish
PUBLISHED_PORT=2002
docker run \
--rm \
--name reachableceo-metrics \
--entrypoint="" \
-p=127.0.0.1:$PUBLISHED_PORT:$SERVICE_PORT \
--volume=$SETTINGS:/metrics/settings.json \
ghcr.io/lowlighter/metrics:$VERSION npm start

View File

@@ -0,0 +1,221 @@
{
"//": "Example of configuration for metrics web instance",
"//": "====================================================================",
"token": "GITHUB API TOKEN", "//": "GitHub Personal Token (required)",
"modes": ["embed", "insights"], "//": "Web instance enabled modes",
"restricted": [], "//": "Authorized users (empty to disable)",
"maxusers": 0, "//": "Maximum users, (0 to disable)",
"cached": 3600000, "//": "Cache time rendered metrics (0 to disable)",
"ratelimiter": null, "//": "Rate limiter (see express-rate-limit documentation)",
"port": 3000, "//": "Listening port",
"optimize": true, "//": "SVG optimization",
"debug": false, "//": "Debug logs",
"debug.headless": false, "//": "Debug puppeteer process",
"mocked": false, "//": "Use mocked data instead of live APIs (use 'force' to use mocked token even if real token are defined)",
"repositories": 100, "//": "Number of repositories to use",
"padding": ["0", "8 + 11%"], "//": "Image padding (default)",
"outputs": ["svg", "png", "json"], "//": "Image output formats (empty to enable all)",
"hosted": {
"by": "", "//": "Web instance host (displayed in footer)",
"link": "", "//": "Web instance host link (displayed in footer)"
},
"oauth":{
"id": null, "//": "GitHub OAUTH client id",
"secret": null, "//": "GitHub OAUTH client secret",
"url":"https://example.com", "//": "GitHub OAUTH callback url (must be the same as the web instance host)"
},
"api":{
"rest": null, "//": "GitHub REST API custom endpoint",
"graphql": null, "//": "GitHub GraphQL API custom endpoint"
},
"control":{
"token": null, "//": "Control token (can be used by external services to perform actions on instance, such as stopping it for redeploys)"
},
"community": {
"templates": [], "//": "Additional community templates to setup"
},
"templates": {
"default": "classic", "//": "Default template",
"enabled": [], "//": "Enabled templates (empty to enable all)"
},
"extras": {
"default": false, "//": "Default extras state (advised to let 'false' unless in debug mode)",
"features": false, "//": "Enable extra features (advised to let 'false' on web instances), see below for supported features",
"//": "________________________________________________________________________",
"//": "metrics.setup.community.templates | Allow community templates download",
"//": "metrics.setup.community.presets | Allow community presets usage",
"//": "metrics.api.github.overuse | Allow GitHub API intensive requests",
"//": "metrics.api.* | Allow use of external API requests",
"//": "metrics.cpu.overuse | Allow CPU intensive requests",
"//": "metrics.run.tempdir | Allow access to temporary directory (I/O operations may be performed)",
"//": "metrics.run.git | Allow to run git",
"//": "metrics.run.licensed | Allow to run licensed",
"//": "metrics.run.user.cmd | Allow to run ANY command by user (USE WITH CAUTION!)",
"//": "metrics.run.puppeteer.scrapping | Allow to run puppeteer to scrape data",
"//": "metrics.run.puppeteer.user.css | Allow to run CSS by user during puppeteer render",
"//": "metrics.run.puppeteer.user.js | Allow to run JavaScript by user during puppeteer render",
"//": "metrics.npm.optional.* | Allow use of specified dependency",
"//": "________________________________________________________________________",
"//": "Additional extra features when user is logged with GitHub",
"logged": [
"metrics.api.github.overuse"
]
},
"plugins.default": false, "//": "Default plugin state (advised to let 'false' unless in debug mode)",
"plugins": { "//": "Global plugin configuration",
"isocalendar":{
"enabled": false, "//": "Enable isocalendar plugin"
},
"languages":{
"enabled": false, "//": "Enable languages plugin"
},
"stargazers":{
"worldmap.token": null, "//": "Stargazers worldmap token",
"enabled": false, "//": "Enable stargazers plugin"
},
"lines":{
"enabled": false, "//": "Enable lines plugin"
},
"topics":{
"enabled": false, "//": "Enable topics plugin"
},
"stars":{
"enabled": false, "//": "Enable stars plugin"
},
"licenses":{
"enabled": false, "//": "Enable licenses plugin"
},
"habits":{
"enabled": false, "//": "Enable habits plugin"
},
"contributors":{
"enabled": false, "//": "Enable contributors plugin"
},
"followup":{
"enabled": false, "//": "Enable followup plugin"
},
"reactions":{
"enabled": false, "//": "Enable reactions plugin"
},
"people":{
"enabled": false, "//": "Enable people plugin"
},
"sponsorships":{
"enabled": false, "//": "Enable sponsorships plugin"
},
"sponsors":{
"enabled": false, "//": "Enable sponsors plugin"
},
"repositories":{
"enabled": false, "//": "Enable repositories plugin"
},
"discussions":{
"enabled": false, "//": "Enable discussions plugin"
},
"starlists":{
"enabled": false, "//": "Enable starlists plugin"
},
"calendar":{
"enabled": false, "//": "Enable calendar plugin"
},
"achievements":{
"enabled": false, "//": "Enable achievements plugin"
},
"notable":{
"enabled": false, "//": "Enable notable plugin"
},
"activity":{
"enabled": false, "//": "Enable activity plugin"
},
"traffic":{
"enabled": false, "//": "Enable traffic plugin"
},
"code":{
"enabled": false, "//": "Enable code plugin"
},
"gists":{
"enabled": false, "//": "Enable gists plugin"
},
"projects":{
"enabled": false, "//": "Enable projects plugin"
},
"introduction":{
"enabled": false, "//": "Enable introduction plugin"
},
"skyline":{
"enabled": false, "//": "Enable skyline plugin"
},
"support":{
"enabled": false, "//": "Enable support plugin"
},
"pagespeed":{
"token": "PageSpeed token",
"enabled": false, "//": "Enable pagespeed plugin"
},
"tweets":{
"token": "Twitter API token",
"enabled": false, "//": "Enable tweets plugin"
},
"stackoverflow":{
"enabled": false, "//": "Enable stackoverflow plugin"
},
"anilist":{
"enabled": false, "//": "Enable aniList plugin"
},
"music":{
"token": "Music provider token",
"enabled": false, "//": "Enable music plugin"
},
"posts":{
"enabled": false, "//": "Enable posts plugin"
},
"rss":{
"enabled": false, "//": "Enable rss plugin"
},
"wakatime":{
"token": "WakaTime API token",
"enabled": false, "//": "Enable wakatime plugin"
},
"leetcode":{
"enabled": false, "//": "Enable leetcode plugin"
},
"steam":{
"token": "Steam token",
"enabled": false, "//": "Enable steam plugin"
},
"16personalities":{
"enabled": false, "//": "Enable 16personalities plugin"
},
"chess":{
"token": "Chess platform token",
"enabled": false, "//": "Enable chess plugin"
},
"crypto":{
"enabled": false, "//": "Enable crypto plugin"
},
"fortune":{
"enabled": false, "//": "Enable fortune plugin"
},
"nightscout":{
"enabled": false, "//": "Enable nightscout plugin"
},
"poopmap":{
"token": "PoopMap API token",
"enabled": false, "//": "Enable poopmap plugin"
},
"screenshot":{
"enabled": false, "//": "Enable screenshot plugin"
},
"splatoon":{
"token": "Splatnet token",
"statink.token": null, "//": "stat.ink token",
"enabled": false, "//": "Enable splatoon plugin"
},
"stock":{
"token": "Yahoo Finance token",
"enabled": false, "//": "Enable stock plugin"
},
"//": ""
}
}

View File

@@ -0,0 +1,8 @@
services:
resume-matcher:
image : resume-matcher
build:
context: ./
dockerfile : build.dockerfile
ports:
- 80:8501

View File

@@ -0,0 +1,28 @@
upstream wger {
server wger-web:2003;
}
server {
listen 80;
location / {
proxy_pass http://wger;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_redirect off;
}
location /static/ {
alias /wger/static/;
}
location /media/ {
alias /wger/media/;
}
# Increase max body size to allow for video uploads
client_max_body_size 100M;
}

View File

@@ -0,0 +1,116 @@
# Please consult the `Deployment` section in the readme if you want to deploy
# this. You *need* to keep this nginx service, even if you have your own,
# otherwise the static files will not be served correctly! If you do remove
# it, configure yours similarly to what's in config/nginx.conf
# Also take a look at the "Static files" section in the .env file
services:
wger-web:
image: wger/server:latest
depends_on:
wger-db:
condition: service_healthy
wger-cache:
condition: service_healthy
#env_file:
# - ./config/prod.env
volumes:
- wger-static:/home/wger/static
expose:
- 2003
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8000
interval: 10s
timeout: 5s
start_period: 300s
retries: 5
restart: unless-stopped
wger-nginx:
image: nginx:stable
depends_on:
- wger-web
volumes:
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf
- wger-static:/wger/static:ro
- wger-media:/wger/media:ro
ports:
- "80:80"
healthcheck:
test: service nginx status
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
wger-db:
image: postgres:15-alpine
environment:
- POSTGRES_USER=wger
- POSTGRES_PASSWORD=wger
- POSTGRES_DB=wger
volumes:
- wger-postgres-data:/var/lib/postgresql/data/
expose:
- 5432
healthcheck:
test: pg_isready -U wger
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
wger-cache:
image: redis:latest
expose:
- 6379
volumes:
- wger-redis-data:/data
healthcheck:
test: redis-cli ping
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
wger-celery_worker:
image: wger/server:latest
command: /start-worker
#env_file:
# - ./config/prod.env
volumes:
- wger-media:/home/wger/media
depends_on:
wger-web:
condition: service_healthy
healthcheck:
test: celery -A wger inspect ping
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
wger-celery_beat:
image: wger/server:latest
command: /start-beat
volumes:
- wger-celery-beat:/home/wger/beat/
#env_file:
# - ./config/prod.env
depends_on:
wger-celery_worker:
condition: service_healthy
volumes:
wger-postgres-data:
wger-celery-beat:
wger-static:
wger-media:
wger-redis-data:
networks:
default:
name: wger_network

7
inprep/wger/update.sh Normal file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
docker compose exec wger-web python3 manage.py sync-exercises
docker compose exec wger-web python3 manage.py download-exercise-images
docker compose exec wger-web python3 manage.py download-exercise-videos
docker compose exec wger-web wger load-online-fixtures
docker compose exec wger-web python3 manage.py sync-ingredients