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

(Feat): Added Appwrite template #685

Closed
wants to merge 3 commits into from

Conversation

cristodcgomez
Copy link

I added a basic Appwrite configuration.

It uses all the traefik settings inside docker-compose.yml (as using domains tab can create some issues on the first run... at least it failed for me several times in that stage)

Comment on lines +20 to +34
labels:
- traefik.enable=true
- traefik.http.services.appwrite_api.loadbalancer.server.port=80

- traefik.http.routers.awmain.rule=Host(`YOUR_DOMAIN_HERE`) && !PathPrefix(`/console`) && !PathPrefix(`/v1/realtime`)
- traefik.http.routers.awmain.entrypoints=web,websecure
- traefik.http.routers.awmain.tls=true
- traefik.http.routers.awmain.tls.certresolver=letsencrypt
- traefik.http.routers.awmain.service=appwrite_api

- traefik.http.routers.awserverf.rule=Host(`YOUR_FUNCTION_DOMAIN_HERE`)
- traefik.http.routers.awserverf.entrypoints=web,websecure
- traefik.http.routers.awserverf.tls=true
- traefik.http.routers.awserverf.tls.certresolver=letsencrypt
- traefik.http.routers.awserverf.service=appwrite_api
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this manual labels?

Copy link
Author

Choose a reason for hiding this comment

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

In appwrite it seems you need to redirect traefik to the appwrite container for all route but not for console or realtime (which goes to their respective containers), otherwise you'll face some issues with the admin area and wirh some websocket connections (that rely on the realtime endpoint)

When I made the template I faced the issue that the domain tab didn't worked (at least for me it didn't) so I had to put the manual traefik labels to make it work.

About the function_domain labels: in some cases the function domain can be different from the regular API domains, so you need to explicitly add it in the traefik routers.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please sb fix this. Thanks

@faeztgh
Copy link
Contributor

faeztgh commented Jan 7, 2025

Please make this available.

@AnonymousDude10
Copy link

Please add this as a template @Siumauricio

Krobys

This comment was marked as resolved.

Copy link

@Krobys Krobys left a comment

Choose a reason for hiding this comment

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

I was able to successfully launch Appwrite and even created a template. However, I am missing the ability to set a path in the domain via script, so the template is not fully completed yet.

If you are eager to launch Appwrite, I have uploaded the Docker Compose and environment file to Pastebin for you:

Docker Compose: Pastebin Link
Environment File: Pastebin Link

Change to your domain in the env

Additionally, you will need to specify the following domains:

A domain for port 80 linked to the main appwrite container, using the path "/".
A domain for port 80 assigned to the appwrite-realtime container, using the path "/v1/realtime".
A domain for port 80 assigned to the appwrite-console container, using the path "/console".
Make sure to configure these domains accordingly.

@Siumauricio
Copy link
Contributor

@Krobys Thank you for taking your time into this I added the path option to templates in this PR #1324

@Krobys
Copy link

Krobys commented Feb 15, 2025

@Krobys Thank you for taking your time into this I added the path option to templates in this PR #1324

Created my PR, thanks for quick path implementation :)
#1327 - PR for Appwrite

@Siumauricio
Copy link
Contributor

Thank you @Krobys, we can close this!

@cristodcgomez
Copy link
Author

I was offline due sickness... but hey, this is a nice reminder about why people just end not helping in OSS projects: My PR was almost 4 months ago, started from scratch and zero help... still not even a thanks for starting something.

You're welcome

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

Successfully merging this pull request may close these issues.

5 participants