You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"script": "#!\/bin\/bash\r\n#\r\n# Server Files: \/mnt\/server\r\n#!\/bin\/bash\r\n# Update and install dependencies\r\napt update\r\napt -y install mariadb-client\r\n# Construct the DATABASE_URL from environment variables\r\nDB_USER=${DB_USER}\r\nDB_PASSWORD=${DB_PASSWORD}\r\nDB_HOST=${DB_HOST}\r\nDB_PORT=${DB_PORT}\r\nDB_NAME=${DB_NAME}\r\nDATABASE_URL=\"mysql:\/\/${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}\/${DB_NAME}\"\r\nexport DATABASE_URL=${DATABASE_URL}\r\n# Connect to the database and create the table if it does not exist\r\nmysql -h ${DB_HOST} -P ${DB_PORT} -u ${DB_USER} -p${DB_PASSWORD} -D ${DB_NAME} <<EOF\r\nCREATE TABLE IF NOT EXISTS Licensing (\r\nlicense VARCHAR(255) NOT NULL PRIMARY KEY,\r\nip VARCHAR(255) NOT NULL,\r\ndiscordId VARCHAR(255),\r\nemail VARCHAR(255)\r\n);\r\nEOF\r\n# Create the license_check view if it does not already exist\r\nview_exists=$(mysql -h ${DB_HOST} -P ${DB_PORT} -u ${DB_USER} -p${DB_PASSWORD} -D ${DB_NAME} -N -B -e \"SELECT COUNT(*) FROM information_schema.VIEWS WHERE TABLE_NAME = 'license_check';\")\r\nif [[ ${view_exists} -eq 0 ]]; then\r\n# Create the license_check view only if it doesn't exist\r\nmysql -h ${DB_HOST} -P ${DB_PORT} -u ${DB_USER} -p${DB_PASSWORD} -D ${DB_NAME} <<EOF\r\nCREATE VIEW license_check AS\r\nSELECT license, ip FROM Licensing;\r\nEOF\r\nfi\r\necho -e \"install complete\"\r\nexit 0",
31
+
"container": "python:3.8-slim",
32
+
"entrypoint": "bash"
33
+
}
34
+
},
35
+
"variables": [
36
+
{
37
+
"name": "App py file",
38
+
"description": "The file that starts the App.",
39
+
"env_variable": "PY_FILE",
40
+
"default_value": "app.py",
41
+
"user_viewable": true,
42
+
"user_editable": true,
43
+
"rules": "required|string",
44
+
"field_type": "text"
45
+
},
46
+
{
47
+
"name": "Additional Python packages",
48
+
"description": "Install additional python packages.\r\n\r\nUse spaces to separate",
49
+
"env_variable": "PY_PACKAGES",
50
+
"default_value": "",
51
+
"user_viewable": true,
52
+
"user_editable": true,
53
+
"rules": "nullable|string",
54
+
"field_type": "text"
55
+
},
56
+
{
57
+
"name": "Requirements file",
58
+
"description": "if there are other requirements files to choose from.",
59
+
"env_variable": "REQUIREMENTS_FILE",
60
+
"default_value": "requirements.txt",
61
+
"user_viewable": true,
62
+
"user_editable": true,
63
+
"rules": "required|string",
64
+
"field_type": "text"
65
+
},
66
+
{
67
+
"name": "DB_HOST",
68
+
"description": "Database Host",
69
+
"env_variable": "DB_HOST",
70
+
"default_value": "172.18.0.1",
71
+
"user_viewable": false,
72
+
"user_editable": false,
73
+
"rules": "required|string|max:20",
74
+
"field_type": "text"
75
+
},
76
+
{
77
+
"name": "DB_USER",
78
+
"description": "Database User",
79
+
"env_variable": "DB_USER",
80
+
"default_value": "",
81
+
"user_viewable": false,
82
+
"user_editable": false,
83
+
"rules": "required|string|max:40",
84
+
"field_type": "text"
85
+
},
86
+
{
87
+
"name": "DB_PASSWORD",
88
+
"description": "Database Password",
89
+
"env_variable": "DB_PASSWORD",
90
+
"default_value": "",
91
+
"user_viewable": false,
92
+
"user_editable": false,
93
+
"rules": "required|string|max:40",
94
+
"field_type": "text"
95
+
},
96
+
{
97
+
"name": "DB_NAME",
98
+
"description": "Database Name",
99
+
"env_variable": "DB_NAME",
100
+
"default_value": "",
101
+
"user_viewable": false,
102
+
"user_editable": false,
103
+
"rules": "required|string|max:20",
104
+
"field_type": "text"
105
+
},
106
+
{
107
+
"name": "DB_PORT",
108
+
"description": "Database Port",
109
+
"env_variable": "DB_PORT",
110
+
"default_value": "3306",
111
+
"user_viewable": false,
112
+
"user_editable": false,
113
+
"rules": "required|string|max:5",
114
+
"field_type": "text"
115
+
},
116
+
{
117
+
"name": "Debug",
118
+
"description": "True or False, not case-sensitive",
0 commit comments