-
Notifications
You must be signed in to change notification settings - Fork 394
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
feat: setting up a production instance #7529
base: master
Are you sure you want to change the base?
Conversation
I am creating a draft PR to gather early feedback about this contribution. I have also documented the set up. Since I wanted to contribute to the wiki which does not allow creating PR against the project wiki, please see this PR in my fork https://github.com/acollign/netrunner-wiki/pull/1/files. Feel free to comment the documentation. I hope someone will be able to follow the steps and validate that both the documentation and the Docker set up are good. |
I've implemented a new strategy which consists of managing the docker-compose file used in production via a template and a new The complete steps are documented in a wiki PR [0]. The process is essentially the following:
@NBKelly would you consider this contribution? Thanks in advance for your feedback. [0] https://github.com/acollign/netrunner-wiki/pull/1/files |
Roughly looks alright to me, but I'm actually clueless about this type of thing, so it might need @NoahTheDuke or @butzopower (I think he's roughly familiar with docker) to look over it. |
(N.B. I have certain biases as a MongoDB employee.) Relevant to this PR vs #7766, I think it would be valuable to abstract the MongoDB deployment. In my production deployments, I target an external MongoDB Atlas cluster, which makes the data persistent (and durably replicated) independent of the web host. For example, I have shut down the MITM Showdown jnet clone, but the database continues to exist and I can relaunch the MITM showdown server in the future without having to manually manage the DB data directory. Possibly, a way forward could be to focus first on a PR generating useful Dockerfiles. Another PR could build upon that to provide a set of docker compose files. To the greatest extent possible, we should decouple those two things so that neither one depends too heavily on assumptions in the other. My PR #7766 only does Dockerfiles, so I suggest we look there for whether I've made any assumptions that would preclude what you want to do with compose files or if I can change anything based on a better approach here. If we can agree on those Dockerfiles, we can merge that PR and then rebase this PR on top of those changes. Some difference I can see at a quick glance about the production Dockerfiles in the two PRs:
My PR also includes two more Dockerfiles so that deployments can be completely independent of the repository:
I personally think those two images simplify deployment. But they can coexist with this PR's approach to generating compose files and building images using docker compose. I prefer my approach of building images separate from docker compose. But I don't have any strong reasons for why people shouldn't use the approach in this PR if it fits their brain better. |
This PR adds a Docker set up that makes possible running netrunner in production. It implements #7516.