Project separated into multiple repositories #2152
-
I have two separate repositories for microservices, each with their own requirements in the acorn file. I want to reference the exact same RDS instance, secrets and such from both. Is it possible that an acorn project spans multiple repositories? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, @revosw. Thank you for your question. Yes, you can absolutely deploy Acorns from multiple repositories to the same project. In Acorn, you can deploy an RDS instance using our service catalogue. For the sake of this example, I will name it Then, you can reference it in your Acornfile like this: containers: nginx: {
image: "nginx:latest"
ports: "80/http"
env: {
DB_HOST: "@{service.rds.address}"
DB_USER: "@{service.rds.secrets.admin.username}"
DB_PASSWORD: "@{service.rds.secrets.admin.password}"
DB_NAME: "@{service.rds.data.dbName}"
}
}
services: rds: external: "rds" The key here is the last line - that is what references the RDS service. The example I gave is just a plain Nginx container with some environment variables set to demonstrate how to get information from the RDS service, but this can be adapted to your use case. You can reference the same RDS service from both of your repositories, allowing both of them to use the same database. Let me know if you have any other questions! |
Beta Was this translation helpful? Give feedback.
Hi, @revosw. Thank you for your question.
Yes, you can absolutely deploy Acorns from multiple repositories to the same project. In Acorn, you can deploy an RDS instance using our service catalogue. For the sake of this example, I will name it
rds
.Then, you can reference it in your Acornfile like this:
The key here is the last line - that is what references the RDS service. The example I gave …