Skip to content

Commit

Permalink
Merge branch 'coolify-build'
Browse files Browse the repository at this point in the history
  • Loading branch information
Geczy committed Dec 20, 2023
2 parents f994ba4 + 3f074d0 commit 7d7fe3e
Show file tree
Hide file tree
Showing 1,821 changed files with 16,303 additions and 20,318 deletions.
154 changes: 77 additions & 77 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,78 +1,78 @@
# to use this file, rename it to .env and fill out the values
# in docker-compose.yml, set env_file to .env for each service
# like this:
# twitch-chat-listener:
# env_file:
# - .env
# remove the environment section from all services in docker-compose.yml as you will now use the .env
# i have it in there because i use doppler

# Used in docker compose to prepend containers
COMPOSE_PROJECT_NAME="dotabod"

# Set the Node environment to development
NODE_ENV="development"

# MongoDB connection URL
MONGO_URL="mongodb://mongodb:27017/dotabod"

# Twitch API credentials from https://dev.twitch.tv/console/apps/
TWITCH_CLIENT_ID=""
TWITCH_CLIENT_SECRET=""

# Twitch EventSub secret for verifying requests
TWITCH_EVENTSUB_SECRET=""

# Comma delimited channel names to join during development
# In production, Dotabod will not join these channels
DEV_CHANNELS=""

# Comma delimited channel names where these users can run mod commands in all channels the bot joins
ADMIN_CHANNELS=""

# If using supabase self hosted docker, add the following to the end of supabase docker-compose.yml
# networks:
# default:
# name: dotabod
# external: true
# Supabase credentials
DB_URL="" # http://kong:8000 if using supabase local docker, from API_EXTERNAL_URL in .env
DB_SECRET="" # the supabase ANON_KEY in supabase docker .env
DATABASE_URL="postgresql://postgres:your-super-secret-and-long-postgres-password@db:5432/postgres"

# Steam Web API key for accessing Steam API data
# https://steamcommunity.com/dev/apikey
STEAM_WEB_API=""

# Steam credentials for retrieving medals
# Must have email auth & 2f authentication disabled
# https://store.steampowered.com/join
STEAM_USER=""
STEAM_PASS=""

# AWS S3 credentials for Supabase backups
# Leave blank if you don't want to backup Supabase
AWS_ACCESS_KEY_ID=""
AWS_SECRET_ACCESS_KEY=""
AWS_BUCKET_NAME=""
AWS_REGION=""

### NGINX setup
### Feel free to ignore these for local dev, only need it to host live going into production
# Server name for the Nginx configuration file
NGINX_HOST=""

# Twitch EventSub API host
EVENTSUB_HOST=""

# SSL/TLS certificates for the GSI backend server
TLS_CERT="-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----"

TLS_KEY="-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----"

# Optional https://stratz.com/api token used for win probability calculation
# to use this file, rename it to .env and fill out the values
# in docker-compose.yml, set env_file to .env for each service
# like this:
# twitch-chat-listener:
# env_file:
# - .env
# remove the environment section from all services in docker-compose.yml as you will now use the .env
# i have it in there because i use doppler

# Used in docker compose to prepend containers
COMPOSE_PROJECT_NAME="dotabod"

# Set the Node environment to development
NODE_ENV="development"

# MongoDB connection URL
MONGO_URL="mongodb://mongodb:27017/dotabod"

# Twitch API credentials from https://dev.twitch.tv/console/apps/
TWITCH_CLIENT_ID=""
TWITCH_CLIENT_SECRET=""

# Twitch EventSub secret for verifying requests
TWITCH_EVENTSUB_SECRET=""

# Comma delimited channel names to join during development
# In production, Dotabod will not join these channels
DEV_CHANNELS=""

# Comma delimited channel names where these users can run mod commands in all channels the bot joins
ADMIN_CHANNELS=""

# If using supabase self hosted docker, add the following to the end of supabase docker-compose.yml
# networks:
# default:
# name: dotabod
# external: true
# Supabase credentials
DB_URL="" # http://kong:8000 if using supabase local docker, from API_EXTERNAL_URL in .env
DB_SECRET="" # the supabase ANON_KEY in supabase docker .env
DATABASE_URL="postgresql://postgres:your-super-secret-and-long-postgres-password@db:5432/postgres"

# Steam Web API key for accessing Steam API data
# https://steamcommunity.com/dev/apikey
STEAM_WEB_API=""

# Steam credentials for retrieving medals
# Must have email auth & 2f authentication disabled
# https://store.steampowered.com/join
STEAM_USER=""
STEAM_PASS=""

# AWS S3 credentials for Supabase backups
# Leave blank if you don't want to backup Supabase
AWS_ACCESS_KEY_ID=""
AWS_SECRET_ACCESS_KEY=""
AWS_BUCKET_NAME=""
AWS_REGION=""

### NGINX setup
### Feel free to ignore these for local dev, only need it to host live going into production
# Server name for the Nginx configuration file
NGINX_HOST=""

# Twitch EventSub API host
EVENTSUB_HOST=""

# SSL/TLS certificates for the GSI backend server
TLS_CERT="-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----"

TLS_KEY="-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----"

# Optional https://stratz.com/api token used for win probability calculation
STRATZ_TOKEN=""
26 changes: 26 additions & 0 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docker Image CI

on:
push:
branches: ["master", "coolify-build"]
pull_request:
branches: ["master"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Docker image
run: |
docker compose -f ./docker-compose.yml build
docker compose -f ./docker-compose.yml push
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Map and Notify On Registry Package Update

on:
registry_package:
types: [updated]

jobs:
notify:
runs-on: ubuntu-latest

steps:
- name: Check for image tag information and valid package name
if: |
github.event.registry_package.package_version.container_metadata.tag.name != '' &&
(
github.event.registry_package.name == 'dota' ||
github.event.registry_package.name == 'twitch-events' ||
github.event.registry_package.name == 'twitch-chat' ||
github.event.registry_package.name == 'steam'
)
run: |
# Map package name to UUID
case "${{ github.event.registry_package.name }}" in
"dota") UUID="esgckgc" ;;
"twitch-events") UUID="aopskdk" ;;
"twitch-chat") UUID="gahgag" ;;
"steam") UUID="asldja" ;;
esac
# Use curl to call a GET webhook with the mapped UUID and API key from secrets
curl -X GET -H "Authorization: Bearer ${{ secrets.COOLIFY_API_KEY }}" "https://${{ secrets.COOLIFY_HOST }}/api/v1/deploy?uuid=${UUID}&force=false"
44 changes: 22 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
.env*
.idea
node_modules
assets
dist
build
config.js
**/volumes
newrelic_agent.log
.idea
!**/locales/en/translation.json
*.key
*.tsbuildinfo
coverage

# yarn v2
.yarn/*
!.yarn/cache
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.env*
!.env.example
.idea
node_modules
assets
build
config.js
**/volumes
newrelic_agent.log
.idea
!**/locales/en/translation.json
*.key
coverage
dist
*.tsbuildinfo
# yarn v2
.yarn/*
!.yarn/cache
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 7d7fe3e

Please sign in to comment.