-
Notifications
You must be signed in to change notification settings - Fork 17
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
Docker compose for stack deploy #282
Conversation
pipeline/Dockerfile
Outdated
@@ -23,7 +23,7 @@ COPY --chown=opam pipeline/. . | |||
RUN sudo chown opam . | |||
|
|||
# Build the project. | |||
RUN opam exec -- dune build --profile=release bin/main.exe | |||
RUN opam exec -- dune build --profile=release ./pipeline/bin/main.exe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the CI build is failing because of this path change?
Step 8/20 : RUN opam exec -- dune build --profile=release ./pipeline/bin/main.exe
---> Running in f11d5059f3c5
Error: Don't know how to build ./pipeline/bin/main.exe
The command '/bin/sh -c opam exec -- dune build --profile=release ./pipeline/bin/main.exe' returned a non-zero code: 1
On line 22 there is a COPY --chown=opam pipeline/. .
that already takes care of "hiding" the pipeline/
directory (so either the COPY or the dune build should handle the pipeline dir, but not both?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the problem here is that the deployer needs absolute path and not relative path. So we have to explicitly say that the path is pipeline/bin/main.exe
. It's a bit convoluted. Perhaps these changes should live on the live branch? And we can have a github action to sync them? I don't know if this makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or can we do some environment variable magic to detect that we are in "deployer mode" to use a different path? I don't know enough about deployer, and I'm just thinking out loud here.
@gs0510 Just writing some thoughts here from yesterday's work.
|
Ah I think I didn't mention this, but this is for deployment on the packet machine, not automatic deployments of cb yet! (It'd be nice to get to that, but we have to many moving parts). I think something to think of also would be (in case we do deployment of production) is that we need to move from docker-compose to docker-stack. |
Yes, I understood that we want to deploy to the "packet" machine. But, I think I don't understand what the purpose of the "packet" machine is. I assumed that the eventual goal was to have a staging environment that we can replicate for production deployments? |
Add script for stack deploy
TODO:
[ ] Make relative paths also work with docker-compose deploy