Skip to content

Fix funkwhale solution #4136

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

Draft
wants to merge 2 commits into
base: development
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
2 changes: 1 addition & 1 deletion packages/grid_client/src/helpers/flists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const FLISTS = {
entryPoint: "/sbin/zinit init",
},
FUNKWHALE: {
value: "https://hub.grid.tf/tf-official-apps/funkwhale-1.4.0.flist",
value: "https://hub.grid.tf/petep.3bot/threefolddev-funkwhale-1.4.0.flist",
entryPoint: "/sbin/zinit init",
},
GITEA: {
Expand Down
30 changes: 6 additions & 24 deletions packages/playground/src/weblets/tf_funkwhale.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,7 @@
#="{ props }"
>
<input-tooltip tooltip="Instance name.">
<v-text-field label="Name" v-model="name" v-bind="props" />
</input-tooltip>
</input-validator>

<input-validator
:value="username"
:rules="[
validators.required('Username is required.'),
validators.isLowercase('Username should consist of lowercase letters only.'),
validators.isAlphanumeric('Username should consist of letters and numbers only.'),
(username: string) => validators.isAlpha('Username must start with alphabet char.')(username[0]),
validators.minLength('Username must be at least 2 characters.', 2),
validators.maxLength('Username cannot exceed 50 characters.', 50),
]"
#="{ props }"
>
<input-tooltip tooltip="Funkwhale admin username.">
<v-text-field label="Username" v-model="username" v-bind="props" />
<v-text-field label="Name/Username" v-model="name" v-bind="props" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this should be only the name, and we can add a description to the tooltip, like instance name, will be used as a username

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
Email can do it too, @AhmedHanafy725, so can Email do it instead of the deployment name?

</input-tooltip>
</input-validator>

Expand Down Expand Up @@ -163,7 +146,6 @@ const profileManager = useProfileManager();
const selectionDetails = ref<SelectionDetails>();

const name = ref(generateName({ prefix: "fw" }));
const username = ref("admin");
const email = ref(profileManager.profile?.email || "");
const password = ref(generatePassword(12));
const solution = ref() as Ref<SolutionFlavor>;
Expand Down Expand Up @@ -222,7 +204,7 @@ async function deploy() {
disks: [
{
size: solution.value.disk,
mountPoint: "/data",
mountPoint: "/var/lib/docker/",
},
],
flist: flist.value,
Expand All @@ -234,9 +216,9 @@ async function deploy() {
envs: [
{ key: "SSH_KEY", value: selectedSSHKeys.value },
{ key: "FUNKWHALE_HOSTNAME", value: domain },
{ key: "DJANGO_SUPERUSER_EMAIL", value: email.value },
{ key: "DJANGO_SUPERUSER_USERNAME", value: username.value },
{ key: "DJANGO_SUPERUSER_PASSWORD", value: password.value },
{ key: "FUNKWHALE_SUPERUSER_EMAIL", value: email.value },
{ key: "FUNKWHALE_SUPERUSER_NAME", value: name.value },
{ key: "FUNKWHALE_SUPERUSER_PASSWORD", value: password.value },
],
nodeId: selectionDetails.value!.node!.nodeId,
rentedBy: rentedBy.value,
Expand All @@ -261,7 +243,7 @@ async function deploy() {
await deployGatewayName(grid, selectionDetails.value.domain, {
subdomain,
ip: vm[0].interfaces[0].ip,
port: 80,
port: 5000,
network: vm[0].interfaces[0].network,
});

Expand Down
Loading