chore: working on configuration for fox api and boop
This commit is contained in:
parent
36d7686ce0
commit
0d9960357c
3 changed files with 103 additions and 1 deletions
0
configs/boop/example.env
Normal file
0
configs/boop/example.env
Normal file
84
configs/fox-api/configuration.php
Normal file
84
configs/fox-api/configuration.php
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
<?php
|
||||||
|
define("ADMIN_LOCKOUT", FALSE); // no trailing slash
|
||||||
|
define("BASE_URL", "BASE_URL_CHANGE_ME"); // no trailing slash
|
||||||
|
define('PORTAL_BASE_URL', 'PORTAL_URL_CHANGE_ME');
|
||||||
|
|
||||||
|
// BOOP
|
||||||
|
define("OIDC_BASE_URL", "https://boop.fynn.ai");
|
||||||
|
define("OIDC_CLIENT_ID", "OIDC_CLIENT_ID_CHANGE_ME");
|
||||||
|
define("OIDC_CLIENT_SECRET", "OIDC_SECRET_CHANGE_ME");
|
||||||
|
|
||||||
|
define("LOGIN_KEY", "LOGIN_KEY");
|
||||||
|
|
||||||
|
define('FURALITY_API_TOKEN', "TEST_TOKEN");
|
||||||
|
define("DEBUG_ENABLED", TRUE);
|
||||||
|
define("VRCHAT_PROXY", "http://{{ index $cfg "proxy_host" }}:{{ index $cfg "proxy_port" }}");
|
||||||
|
|
||||||
|
// Convention Settings
|
||||||
|
define("FURALITY_CONVENTION_ID", "DEV01");
|
||||||
|
define('FURALITY_CONVENTION_ID_ABBREVIATION', 'DEV');
|
||||||
|
|
||||||
|
// Graylog
|
||||||
|
define("GRAYLOG_HOST", "127.0.0.1");
|
||||||
|
define("GRAYLOG_PORT", 31234);
|
||||||
|
|
||||||
|
define("SHOPIFY_APIKEY", "{{ index $cfg "apikey" }}");
|
||||||
|
define("SHOPIFY_APIPASSWORD", "{{ index $cfg "apipassword" }}");
|
||||||
|
define("SHOPIFY_SHOPURL", "{{ index $cfg "shopurl"}}");
|
||||||
|
define("SHOPIFY_PRICERULE_10", "{{ index $cfg "pricerule_10" }}");
|
||||||
|
define("SHOPIFY_PRICERULE_25", "{{ index $cfg "pricerule_25" }}");
|
||||||
|
|
||||||
|
define("DISCORD_OAUTH_CLIENT_ID", "{{ index $cfg "oauth_client_id" }}");
|
||||||
|
define("DISCORD_OAUTH_CLIENT_SECRET", "{{ index $cfg "oauth_client_secret" }}");
|
||||||
|
define("DISCORD_OAUTH_URI", "{{ index $cfg "oauth_uri" }}");
|
||||||
|
define("DISCORD_BOT_TOKEN", "{{ index $cfg "bot_token" }}");
|
||||||
|
define("DISCORD_GUILD_ID", "{{ index $cfg "guild_id" }}");
|
||||||
|
define("DISCORD_LOG_CHANNEL_ID", "{{ index $cfg "log_channel_id" }}");
|
||||||
|
define("DISCORD_REGLOG_CHANNEL_ID", "{{ index $cfg "reglog_channel_id" }}");
|
||||||
|
define("DISCORD_CLIENT_ID", "{{ index $cfg "oauth_client_id" }}");
|
||||||
|
define("DISCORD_CLIENT_SECRET", "{{ index $cfg "oauth_client_secret" }}");
|
||||||
|
|
||||||
|
define("DB_HOST", "{{ index $cfg "host" }}");
|
||||||
|
define("DB_PORT", "{{ index $cfg "port" }}");
|
||||||
|
define("DB_DATABASE", "{{ index $cfg "database" }}");
|
||||||
|
define("DB_USER", "{{ index $cfg "user" }}");
|
||||||
|
define("DB_PASSWORD", '{{ index $cfg "password" }}');
|
||||||
|
|
||||||
|
define("REDIS_SCHEME", "{{ index $cfg "scheme" }}");
|
||||||
|
define("REDIS_HOST", "{{ index $cfg "host" }}");
|
||||||
|
define("REDIS_USERNAME", "{{ index $cfg "username" }}");
|
||||||
|
define("REDIS_PASSWORD", '{{ index $cfg "password" }}');
|
||||||
|
define("REDIS_PORT", {{ index $cfg "port" }});
|
||||||
|
define("REDIS_CACHE_TIME", {{ index $cfg "cache_time" }});
|
||||||
|
define("READ_REDIS_HOST", "{{ index $cfg "read_host" }}");
|
||||||
|
define("READ_REDIS_PORT", {{ index $cfg "read_port" }});
|
||||||
|
define("REDIS_SPLIT_READ_WRITE", false);
|
||||||
|
|
||||||
|
define("RABBITMQ_HOST", "127.0.0.1");
|
||||||
|
define("RABBITMQ_PORT", {{ index $cfg "port" }});
|
||||||
|
define("RABBITMQ_PRODUCER_USER", "{{ index $cfg "producer_user" }}");
|
||||||
|
define("RABBITMQ_PRODUCER_PASSWORD", '{{ index $cfg "producer_password" }}');
|
||||||
|
|
||||||
|
define("PAYPAL_CLIENT_ID", '{{ index $cfg "client_id" }}');
|
||||||
|
define("PAYPAL_CLIENT_SECRET", '{{ index $cfg "client_secret" }}');
|
||||||
|
define("PAYPAL_WEBHOOK_ID", "{{ index $cfg "webhook_id" }}");
|
||||||
|
|
||||||
|
define("STRIPE_PUBLIC_PK", '{{ index $cfg "public_pk" }}');
|
||||||
|
define("STRIPE_SECRET_SK", '{{ index $cfg "secret_sk" }}');
|
||||||
|
define("STRIPE_WEBHOOK_SK", '{{ index $cfg "webhook_sk" }}');
|
||||||
|
|
||||||
|
define("PATREON_CLIENT_ID", '{{ index $cfg "patreon_client_id" }}');
|
||||||
|
define("PATREON_CLIENT_SECRET", '{{ index $cfg "patreon_client_secret" }}');
|
||||||
|
define("PATREON_WEBHOOK_SECRET", '{{ index $cfg "patreon_webhook_secret" }}');
|
||||||
|
|
||||||
|
define("VRCHAT_API_USERNAME", '{{ index $cfg "api_username" }}');
|
||||||
|
define("VRCHAT_API_PASSWORD", '{{ index $cfg "api_password" }}');
|
||||||
|
|
||||||
|
define("S3_SECRET", "{{ index $cfg "secret" }}");
|
||||||
|
define("S3_KEY", "{{ index $cfg "key" }}");
|
||||||
|
|
||||||
|
define("POSTMARK_KEY", "{{ index $cfg "key" }}");
|
||||||
|
|
||||||
|
define('PATREON_REDIRECT_URI', '/auth/patreon');
|
||||||
|
define('DISCORD_REDIRECT_URI', '/auth/discord');
|
||||||
|
|
|
@ -1 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[BOOTSTRAP] Running initial setup for PHP F.O.X. API ..."
|
||||||
|
|
||||||
|
|
||||||
|
mysql -u root -e "CREATE DATABASE IF NOT EXISTS fox_api;"
|
||||||
|
password=$(openssl rand -base64 32)
|
||||||
|
password=$(echo $password | sed 's/[^a-zA-Z0-9]//g')
|
||||||
|
echo $password > /home/coder/fox-api/.dbpass
|
||||||
|
mysqladmin -u root password $password 2>&1 | grep -v "Warning"
|
||||||
|
mysql -u root -p$password -e "CREATE USER 'fox_api'@'%' IDENTIFIED BY '$password';" 2>&1 | grep -v "Warning"
|
||||||
|
mysql -u root -p$password -e "GRANT ALL PRIVILEGES ON fox_api.* TO 'fox_api'@'%';" 2>&1 | grep -v "Warning"
|
||||||
|
mysql -u root -p$password -e "FLUSH PRIVILEGES;" 2>&1 | grep -v "Warning"
|
||||||
|
chown coder:coder /home/coder/fox-api/.dbpass
|
||||||
|
|
||||||
|
echo "[BOOTSTRAP] DB Configured, setting up .env file..."
|
||||||
|
|
||||||
|
# read /home/coder/.coder-env as they contain the workspace name and username
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue