self-hosted icon indicating copy to clipboard operation
self-hosted copied to clipboard

Subscriptions on your self-hosted server - Docker install 2023

Open Beast-Panik opened this issue 2 years ago • 1 comments

Hello, I have today to install the server according to the current Docker installation method which has worked without problems. Registering my account on my own server was no problem. Now I wanted to add a subscription to the account but the "help" in the documentation is incorrect. In the commands the "EMAIL@ADDR" should be exchanged against the address of the regwestrierten account, but that does not work because there is not this expression in the docker commands ` docker compose exec db sh -c "MYSQL_PWD=$MYSQL_ROOT_PASSWORD mysql $MYSQL_DATABASE -e
'INSERT INTO user_roles (role_uuid , user_uuid) VALUES ((SELECT uuid FROM roles WHERE name="PRO_USER" ORDER BY version DESC limit 1) ,(SELECT uuid FROM users WHERE email="$EMAIL")) ON DUPLICATE KEY UPDATE role_uuid = VALUES(role_uuid);'
"

docker compose exec db sh -c "MYSQL_PWD=\$MYSQL_ROOT_PASSWORD mysql \$MYSQL_DATABASE -e \
  'INSERT INTO user_subscriptions SET uuid=UUID(), plan_name=\"PRO_PLAN\", ends_at=8640000000000000, created_at=0, updated_at=0, user_uuid=(SELECT uuid FROM users WHERE email=\"$EMAIL\"), subscription_id=1, subscription_type=\"regular\";' \
"`

when entering the first command without changing anything, i get this error message.

ERROR 1048 (23000) at line 1: Column 'user_uuid' cannot be null

is the old and the new installation method mixed here or where is the error? How can I create a subscription for the deposited accounts with the current istallation method?

Beast-Panik avatar Feb 18 '23 12:02 Beast-Panik

./server.sh create-subscription your_email_addr

jackyzy823 avatar Feb 19 '23 13:02 jackyzy823