Architecture advice

Hello guys, I need some advice, I’m having a hard time deciding what to do.

I will tell a little bit about my architecture:

  • I have an api(nodejs) * I need a database here
  • I have an admin tool(react)
  • I have a webapp tool(react)
  • I have a website(wordpress) * I need a database here
  • I’m using kubernetes + google cloud

What is missing:

  • Isolated database for api
  • Isolated database for wordpress site
  • Different ways to deploy staging/production(Should be in differente machines in gcp)

The question is:

  • Should I have a .circleci/config.yml per project?
  • Should I have a main config to have mysql?
  • How can I set mysql credentials for api/wordpress?
  • How can I deploy to staging/production?

Really sorry for that questions but I dont have any experience with devops :frowning:

Yes. Each project needs to be able to run a separate build e.g. to run tests of various kinds, either on master or on a branch.

In general, these should be set in environment variables and injected into your CI or staging/live deployed application.

That’s a broad question and books are available on it. If you want to do CI/CD then you can use rsync to get your files into place or if you are deploying using containers, use Docker/Compose/Swarm commands as appropriate.

You might also want to create an integration build, where you spin up all your services (e.g. in Docker Compose) to run end-to-end tests. This generally contains a real database containing preset seed data (e.g. MySQL).

1 Like