mooxl / astroad

A pre-configured setup for easy website development with Astro and Payload CMS using Docker.
MIT License
98 stars 8 forks source link

How to create the server? #89

Open silveltman opened 1 year ago

silveltman commented 1 year ago

Thanks a lot for creating this! I'm totally unexperienced with Docker and therefore it is not clear to me how to deploy this.

How I understand it I must create a server somewhere and get the USER, HOST and KEY, then the rest goes automatically via Github Actions. What would be the easiest wat way to create such a server? (I have only used tools like Vercel for hosting till now).

Does this host only Payload or the Astro project too? If so, does it support a multi-tenant app with payload (https://payloadcms.com/blog/how-to-build-a-multi-tenant-app-with-payload)

Would apperiate the help! :)

mooxl commented 1 year ago

Hey there! Since my customers have full control over the Payload instance in this project, multi-tenancy is not supported. In other words, each new project will have a separate payload and Astro container that communicate with each other.

Nonetheless, I do acknowledge the benefits of establishing a one-to-many relationship, whereby multiple Astro containers interface with a single Payload instance. This approach would necessitate some structural alterations. Regrettably, due to academic obligations and work responsibilities, I won't be available to make these changes until the conclusion of September. So, you'll have to wait a little bit for this to be possible.

Astroad is designed for people who have their own server. You can choose either a VPS or a dedicated server based on your needs. Personally, I have a cloud server from Hetzner for 9€ per month. I currently host nine different projects on it and still have plenty of resources available.

To deploy Astroad on your server, ensure that you have Docker and Node/Yarn installed. Additionally, you will need a reverse proxy to connect multiple services to the internet using a single IP and port. Astroad is currently configured to use Traefik as the reverse proxy, but I am planning to include a CLI script that allows you to choose between NGINX, Caddy, and Traefik.

Platforms like Vercel, Netlify, etc., offer the ease of not having to manage server setup and maintenance, but once you've established the server settings, the level of control over your data and services that you obtain is significantly superior. Plus, the overall cost implications are considerablely lower. Additionally, gaining server and internet knowledge is valuable. This deeper comprehension can aid in both optimizing projects and handling potential challenges more effectively.

TechSynthesis commented 8 months ago

@mooxl any updates on the multi-tenancy support? If you don't have the time to implement it could you please give me some advice on what I need to do to move forward, what structural changes will be required. I've setup payload to support multi-tenancy. I'm just trying to figure out what I need to do on the astro-end?