HomePhabricator
Diffusion Comm 2553ec4bb860

[keyserver] Shift Redis Docker Compose config from ports to expose

Description

[keyserver] Shift Redis Docker Compose config from ports to expose

Summary:
Based on this StackOverflow, the only difference between ports and expose is that ports exposes the port on the host machine, whereas expose only exposes it to other services in the same Docker Compose config.

Since we intend for this Docker Compose config to be publicly deployable, I think it would be good to have a bit stronger security here and avoid exposing the Redis port publicly on the host machine.

It may make debugging a bit more complicated... we could consider creating a separate docker-compose.yml for dev, but to be honest I don't think we even need to run dev in Docker (we're aiming to use Nix for that) so it's probably not a big deal.

Test Plan: Run docker-compose up --build and make sure Node can still connect to Redis

Reviewers: jimpo, varun

Reviewed By: varun

Subscribers: palys-swm, Adrian, atul, karol-bisztyga, yayabosh

Differential Revision: https://phabricator.ashoat.com/D3883