[mproxy](https://github.com/kevinmcconnell/mproxy) is a custom minimal proxy designed specifically for Kamal. It has two big advantages over Traefik: 1. Imperative deployments - we tell it to switch from container A to container B, and it waits for container B to start then switches. No need to poll for health checks ourselves or mess around with forcing health checks to fail. 2. Support for multiple apps - as much as possible, configuration is supplied at runtime by the deploy command, allowing us to have multiple apps share an instance of mproxy without conflicting config.
11 lines
410 B
Docker
11 lines
410 B
Docker
FROM registry:4443/nginx:1-alpine-slim
|
|
|
|
COPY default.conf /etc/nginx/conf.d/default.conf
|
|
|
|
ARG COMMIT_SHA
|
|
RUN echo $COMMIT_SHA > /usr/share/nginx/html/version
|
|
RUN mkdir -p /usr/share/nginx/html/versions && echo "version" > /usr/share/nginx/html/versions/$COMMIT_SHA
|
|
RUN mkdir -p /usr/share/nginx/html/versions && echo "hidden" > /usr/share/nginx/html/versions/.hidden
|
|
RUN echo "Up!" > /usr/share/nginx/html/up
|
|
|