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
Development Works out of the Box #16747
Comments
Is it possible to sync files with dev container via docker-sync? |
I also opened #20466 which you might want to include in your list. I think having a easy to set up development environment is going to be important especially to increase community contributions to this absolutely amazing project. |
@Austio it would be awesome indeed to have a docker-compose setup to run a "light" development instance. I am working on a MacBookPro M1 and unfortunately, the Vagrant option doesn't really work (VirtualBox is not ready yet). The other option is indeed to use the docker-compose, but although I almost made it run, now I am stuck because apparently only HTTPS is supported but I am not going to install a reverse proxy just for that... Also, by default |
Just want to say that I think this could be such a super important issue to tackle, with the mass interest in Mastodon. I am finding it unusually challenging to get a development environment up and running. I am new to Mastodon, so some of this is about what I don't know, but I am finding this to be more challenging (to get a dev environment) than almost any other project I have a taken a look at. I can do it in WSL alone, but when I want to try to get the docker compose/dev container based approach going, it is incredibly difficult, imo. I am particularly interested in the Docker route, because I have a sense that down that path lies a more scalable option for people who want to run a server. My goal would be to get something that can run under AWS ECS (or equivalent) so that somebody running an instance can dynamically scale any part that needs scaling. I think that could be a sweet spot for people trying to host an instance--not a server per se, but something containerized that can expand and contract, but without the full administrative/learning/security overhead of K8S--which, I think is not worth setting up/paying for for one instance. |
In case someone is interested, I wrote a guide to run a dev environment in a MacBookPro M1 (pro / max) https://gist.github.com/claudioc/5b245d15677f27db36d07fc089ad0945 |
I would really love this because setting up vagrant especially on a Linux host requires installing the Virtualbox kernel modules. |
I have raised PR #22206 that adds |
I closed my PR because as it turns out, Docker-based development workflow for Mastodon is already setup via VS Code's DevContainers. The workflow is:
The correspondong Dockerfile and docker-compose.yml files are in .devcontainer folder. |
Well this is what I tried but it errored and I haven't been able to figure it out by googling since it seems to be an extremely rare/isolated problem #20466 |
@CEbbinghaus I don't have a Windows machine. But if you want to unblock yourself for now, you can take the Dockerfile.dev and docker-compose.dev.yml from my PR and run the commands in the PR description. Ping me at https://fosstodon.org/@nilesh in case you run into issues. |
Pitch
Hey Team,
The current docker/docker-compose.yml explicitly targets production and the current steps for setting up a dev environment are a work in progress on the "getting started".
You can search in the issues and see quite a few issues with development, this would reduce the "help footprint" by providing an env for people to dev in, there are dozens, just picked a few
https://github.com/mastodon/mastodon/issues?q=is%3Aissue+development
I can setup a docker-compose.dev.yml and Docker.dev to support the env right now.
I think even better would be to invert this. It would break anything that currently depends on the docker being production
Dockerfile
anddocker-compose.yml
target the development buildAlternatively
docker-compose.yml
target development, create a Dockerfile.devMotivation
To support all the features, this is a relatively complex software system. Someone who hasn't worked on elastic,redis, rails and postgres for years is going to have a pretty rough time. whereas if we have a docker-compose.yml they can at least
docker-compose -f docker-compose.dev.yml up
and be off to the racesThe text was updated successfully, but these errors were encountered: