Skip to content
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

Tutorial for setting up AppFlowy on Hetzner Cloud #959

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

suntorytimed
Copy link
Contributor

@suntorytimed suntorytimed commented Oct 1, 2024

  • using Hetzner Cloud server
  • using Hetzner Cloud Object Storage

The server and credentials used in the tutorial and shown in the screenshot got deleted and don't need to be censored.

I have read and understood the Contributor's Certificate of Origin available at the end of
https://raw.githubusercontent.com/hetzneronline/community-content/master/tutorial-template.md
and I hereby certify that I meet the contribution criteria described in it.
Signed-off-by: Stefan Weiberg [email protected]

* using Hetzner Cloud server
* using Hetzner Cloud Object Storage
@svenja11 svenja11 added the review wanted Request a review label Oct 9, 2024
@svenja11
Copy link
Collaborator

Thank you @suntorytimed! I reviewed your tutorial and I made some changes.

The first commit are mainly just spelling and formatting updates. I also removed "Hetzner cloud server" because we try to keep the tutorials general and you could install AppFlowy Cloud on any server if you wanted to.

The second commit has all the big changes:

  • Step 1

    If there already are existing tutorials or guides for something, we usually just link to them in the community tutorial instead of explaining it again. This makes it easier to keep everything up-to-date and we don't need to check several tutorials or guides in case anything changes. In this tutorial, this is the case with "Creating a Bucket" and "Generating S3 credentials". I removed those explanations with their screenshots and linked to the existing getting starteds instead.

  • Step 2

    I wasn't sure if it was clear enough so I added a little bit more information.

  • Step 3

    If the password in docker-compose.yml isn't identical to the password in deploy.env, you won't be able to login. I added a brief section in docker-compose.yml that mentions the password and added a respective note in deploy.env too.

    If you don't add a key to the ai service in the docker compose file, the ai service container will keep restarting over and over again. So added a step to either add a key or comment out the service.

  • Step 4

    You mentioned that they should change the password everywhere it's mentioned but it's actually enough to update the password variable at the beginning of the file. So I changed that.

    I also added a little note why you should set up SMTP

  • Step 6

    When I followed your tutorial, I was struggling with this a bit. I added the steps that I missed and that I think might be helpful to others.

    It also threw me off that I suddenly wasn't able to log in anymore after restart. It gave me error messages and I thought I must have done something wrong. Once you follow the magic link, it's back to normal again. I added this info to avoid confusion for others.

Please review my changes and let me know if you're not fine with any of the changes I made. You can also make your own changes again.

@svenja11 svenja11 added needs action Something has to be updated and removed review wanted Request a review labels Oct 22, 2024
@suntorytimed
Copy link
Contributor Author

suntorytimed commented Oct 23, 2024

@svenja11 thanks for your review and all the improvements!

Open `docker-compose.yml` with you favourite text editor and make the following changes:

* Edit the postgres service

  Change the default value `password` to a secure password (in this example `securepassword`).

  \```yml
    postgres:
      restart: on-failure
      image: pgvector/pgvector:pg16
      environment:
        - POSTGRES_USER=${POSTGRES_USER:-postgres}
        - POSTGRES_DB=${POSTGRES_DB:-postgres}
        - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-securepassword}
        - POSTGRES_HOST=${POSTGRES_HOST:-postgres}
  \```

This step is actually not required, as the password will be set in the deploy.env file as POSTGRES_PASSWORD. Therefore

  # replace the value of ${POSTGRES_PASSWORD} with
  # the password you set in docker-compose.yml
  # change the secret

is incorrect, as what you set in the deploy.env for ${POSTGRES_PASSWORD} overrides the value in the docker-compose.yml and not the other way around. Afaik. the password in the URLs need to be changed, as they are not pulled from an environment variable.

@svenja11
Copy link
Collaborator

Now I'm confused. 😅
I tested it several times and this was the only way I could get it to work. If the password wasn't the same in both files, it gave me the error message "password mismatch".
But I just tested it again and now it works as you said. 🤷

I just checked and they did some changes to the password in this quite recent MR. Maybe this broke something and they were able to fix it in the meantime.

Either way, I will remove this section as you suggested.👍

@svenja11 svenja11 added ready and removed needs action Something has to be updated labels Oct 24, 2024
@suntorytimed
Copy link
Contributor Author

Yes, I see it now. The AppFlowy-Cloud project is a very active one and still in an early beta stage. That's why they sometimes change quite a lot in their deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants