Skip to content
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-dev.yml #562

Closed
Zusel opened this issue Oct 29, 2021 · 8 comments · Fixed by #608
Closed

Docker-Compose-dev.yml #562

Zusel opened this issue Oct 29, 2021 · 8 comments · Fixed by #608
Labels
enhancement New feature or request

Comments

@Zusel
Copy link

Zusel commented Oct 29, 2021

Good day,

could you add a docker-compose-dev.yml?
I wanted to try my luck with IMAP and bounce.
Unfortunately, some things in your project are not clear to me and that's why I can't manage to start it (file paths are not correct in your Dockerfile). So that I can develop myself I would ask you to write a Docker-Compose which builds the Dockerfile.

@Zusel Zusel added the enhancement New feature or request label Oct 29, 2021
@knadh
Copy link
Owner

knadh commented Oct 30, 2021

Unfortunately, some things in your project are not clear to me and that's why I can't manage to start it (file paths are not correct in your Dockerfile)

Could you please elaborate? The current Dockerfile is for use with Goreleaser for releasing Docker images. And, the docker-compose file is for running demo and production instances by pulling the latest release from DockerHub.

Have you followed the developer setup guide?

@mr-karan would it make sense to have dev definitions in the docker-compose file that offers Node, Go, yarn etc. in a dev image that mounts the local file system? Not sure how this would work. Keep docker-compose up dev-frontend running (which runs auto-updating yarn serve) and run and re-run docker-compose up dev-backend every time the Go code changes during development?

@mr-karan
Copy link
Collaborator

We can explore using profiles which are meant for this purpose.

Caveat: This is relatively a newer feature launched in 1.28.0 (https://docs.docker.com/compose/release-notes/#1280) and people would need to have updated docker-compose version to run this. Since profiles is not backported to older versions, existing users won't be able to use the existing docker-compose.yml in it's current form should they decide to update.

So yeah, given that limitation, ^ either we can take a call on not supporting older version or have a separate docker-compose-dev.yml.

@Zusel
Copy link
Author

Zusel commented Oct 30, 2021

unfortunately i don't have much experience with go development. That there are profiles was not known to me because in my company always different files are used for it. I find that also clearer. Developing this with a Docker file would have the advantage that you do not have to "install" it on your system. I have not seen the DEV setup yet. Maybe I'll manage to write a Docker Compose Dev and show them what I wanted to achieve with it.

@knadh
Copy link
Owner

knadh commented Oct 30, 2021

Thanks. Please do read the contribution guidelines @Zusel.

So yeah, given that limitation, ^ either we can take a call on not supporting older version or have a separate docker-compose-dev.yml.

@mr-karan sounds like it's simpler to do this. Also, why create a new .yml file when the two dev blocks could just be a part of the existing file?

@mr-karan
Copy link
Collaborator

mr-karan commented Oct 30, 2021

why create a new .yml file when the two dev blocks could just be a part of the existing file?

For a very simple reason (and we have the issues history to back this claim) that a lot of users simply run docker-compose up -d which seems very natural thing to do :). That would end up running dev services. If we have a separate dev file, which will only be used by contributors, I guess we can avoid a lot of confusion. But yeah, either of the approach should be okay, you can take a call. I can work on the dev docker setup.

@knadh
Copy link
Owner

knadh commented Oct 30, 2021

For a very simple reason (and we have the issues history to back this claim) that a lot of users simply run docker-compose up -d which seems very natural thing to do :).

Yep, fair point.

@knadh
Copy link
Owner

knadh commented Nov 29, 2021

@mr-karan would you be able to look into this?

@mr-karan
Copy link
Collaborator

Ah, got busy and lost track of this. I'll try pushing this in next couple of days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants