activist-org / activist

An open-source activism platform
https://activist.org
GNU Affero General Public License v3.0
218 stars 181 forks source link

Splitting Development and Production #529

Open to-sta opened 10 months ago

to-sta commented 10 months ago

Terms

Issue

I opened this issue for a general discussion on splitting Development and Production.

What needs to be done?

  1. Seperate docker-compose file for prod
  2. We need to keep migrations files in sync with prod
  3. Splitting backend settings.py into prod and dev settings ...

What else do we need to work on?

andrewtavis commented 10 months ago

Ping @momanyisamuel, @wkyoshida 🙃

wkyoshida commented 10 months ago

Should there be a distinction between local and development? By this I mean:

With this, we could:

to-sta commented 10 months ago

Yeah @wkyoshida that makes a lot of sense. I think this could be done with a multi-stage deployment. That way we can utilize github secrets for the env. variables and do not need to expose any sensitive data.

Environments:

Where Staging (staging.activist.org) and Production (activist.org) are deployed and we have an approval step in between Staging and Production.

Do we need to make seperate branches?

Aside from that I think we also need to add a new env. variable for api_root for fetching data from the backend. As soon as we connect the frontend and backend.

wkyoshida commented 10 months ago

Agreed on the above @to-sta :rocket:

Do we need to make seperate branches?

We could do a deployment based on branches or one based on GitHub releases. I have found that a GH release = production seems to be a good breakpoint logically - that's been my experience though. Regardless of which strategy however, I'm thinking that keeping the main branch reflecting the staging environment likely makes most sense, since that environment would contain the latest changes - and the version folks would likely want to keep their local development environment updated with. Would that make sense?

If we were to do a GH-release deployment, we also already clear the project board every 2 weeks after every dev sync - so there's an existing cadence we can already follow. After a sync, we could:

Some concerns worth noting (for completion):

to-sta commented 10 months ago

I am all for the GH-release deployment @wkyoshida. Thanks for bringing this up 💯 (keep's everything simple and lean).

We could start with the 2 week cycle and adjust it in the future. There is still a lot work to be done before we can start with a release cycle.

andrewtavis commented 10 months ago

GitHub releases sound good on my end as well! Thanks so much for the conversation here! 🙏

andrewtavis commented 1 month ago

Ping @anthonyshibitov for an issue that you could pick up :)