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

Switch from Cloudflare Pages to DigitalOcean on monorepo / next.js apps #56

Open
4 of 5 tasks
DaviPtrs opened this issue Jul 22, 2024 · 3 comments
Open
4 of 5 tasks
Assignees

Comments

@DaviPtrs
Copy link
Contributor

DaviPtrs commented Jul 22, 2024

2 scenarios:

  1. Use the digital ocean build environment like shown below (only if it's not fucked up like on Cloudflare Pages)
    https://docs.digitalocean.com/products/app-platform/how-to/deploy-from-monorepo/
    https://github.com/digitalocean/sample-monorepo
    https://docs.digitalocean.com/products/app-platform/reference/buildpacks/nodejs/
    https://www.youtube.com/watch?v=PmFtK01G_A8

  2. Use our own build environment (with cicd pipelining)
    For that option I'm considering Drone CI, because it's open source and it has support for adding features as a extension.
    Github Actions is absolutely awful for conditional path pipelines and Circle CI is better but far beyond being good.
    https://www.drone.io/
    https://www.youtube.com/watch?v=-VfJq2UKYCE
    https://github.com/meltwater/drone-convert-pathschanged


TODO list from the old task:

@EdSDR EdSDR changed the title Migrate Monorepo to Digital Ocean App Platform Switch from Cloudflare Pages to DigitalOcean on monorepo / next.js apps Jul 22, 2024
@DaviPtrs
Copy link
Contributor Author

DaviPtrs commented Jul 30, 2024

For now we're using the built in build environment but already found a bug

Image

The build environment often "loses" the next binary

Image

The current workaround is to force rebuild while clearing the build cache

Image

Image

@DaviPtrs
Copy link
Contributor Author

DaviPtrs commented Aug 10, 2024

Summary

We are using Drone CI for most deployments, while others are still being built in the Digital Ocean build environment. All deployments handled by Drone CI are being built as Docker images and then the Digital Ocean app is pointing to the branch Docker tag (main for production and dev for development).

communex-page (Static SPA site built by Digital Ocean)

PROD: https://communex.ai/ , https://communex-page-xw7rh.ondigitalocean.app/
DEV: https://dev.communex.ai/ , https://dev-communex-page-8aoym.ondigitalocean.app/

commune-governance (Drone CI for docker image) (not gone live yet)

PROD: https://commune-governance-q32fh.ondigitalocean.app/
DEV: https://dev-commune-governance-4goke.ondigitalocean.app/

community validator (Drone CI for docker image)

PROD: https://validator.communeai.net/ , https://community-validator-engn6.ondigitalocean.app/
DEV: https://dev.validator.communeai.net/ , https://dev-community-validator-cqpy5.ondigitalocean.app/

commune page (Drone CI for docker image)

PROD: https://communeai.org/ , https://commune-page-xsrfo.ondigitalocean.app/
DEV: https://dev.communeai.org/ , https://dev-commune-page-33rl9.ondigitalocean.app/

comrads-worker (Drone CI for docker image)

It's being deployed under the same app as community-validator

Image

@DaviPtrs
Copy link
Contributor Author

@EdSDR Do you think is a good idea to put the above guide on the monorepo readme?

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

No branches or pull requests

2 participants