Docker contexts in a multi-project repo #2140
Unanswered
miketheman
asked this question in
Q&A
Replies: 2 comments 4 replies
-
Linking this issue as it might be relevant: #1345 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello @miketheman. Thank you for reaching out!
Yes. You should init from the root and create those two services individually.
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! Trying out copilot, and it looks like it expects the file structure to be very specific, so I thought I'd capture some experiences here to share.
Examples that cropped up:
git init
) provides this question:Surmountable with user input - nice work! But this has already come after I've initialized an
env
- should that check come earlier in a development lifecycle, so I've not already deployed some AWS infra by the time I hit this?I'm trying to deploy 2 separate copilot projects from the same git repo - with shared context, leading to this structure:
In this example, I want to share
app.py
(and other files, etc) to both contexts.Using
docker-compose.yml
, from the root, I can set the build context like so:And in
app1/app1.Dockerfile
I canCOPY
from the root dir with no modification, and any extra files inapp1/
would have to be prefixed in theapp1.Dockerfile
, since the context starts from the root.In copilot's manifest.yml, the build context is a similar "simple" context, that will also accept configuration, but since the desired context file is outside of the root of where copilot lives, it can't be injected as far as I know.
Does this make sense? Should I be init`ing copilot from the root as well, and naming the services app1/app2?
copilot env delete
- I get:That seems wrong? I ought to be able to tear down infra I just created? Looking at the generated IAM role, I can see a statement for
GetAndPassCopilotRoles
(comes from here) - but something else isn't matching? Am I getting caught in some other IAM confusion? I'll keep the env around for more debugging, but I guess I can always use the CFN Console UI to remove the entire stack?If these are better served as individual GH Issues, happy to move them over! Thanks!!
Beta Was this translation helpful? Give feedback.
All reactions