Skip to content

Commit

Permalink
docker: use concurrently instead of supervisord
Browse files Browse the repository at this point in the history
  • Loading branch information
vnghia committed Jan 4, 2024
1 parent 24b2f82 commit 97b3a25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ FROM caddy:2.7.5 as reverse-proxy

FROM $NODE_BASE_IMAGE
RUN apt-get update && apt-get install -y --no-install-recommends curl supervisor ca-certificates && rm -rf /var/lib/apt/lists/*
RUN npm install -g concurrently && concurrently --version
RUN useradd -m -u 1001 ryot
WORKDIR /home/ryot
USER ryot
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY config/Caddyfile /etc/caddy/Caddyfile
COPY --from=reverse-proxy /usr/bin/caddy /usr/local/bin/caddy
COPY --from=frontend-builder --chown=ryot:ryot /app/apps/frontend/node_modules ./node_modules
Expand All @@ -60,4 +60,5 @@ COPY --from=frontend-builder --chown=ryot:ryot /app/apps/frontend/public ./publi
COPY --from=app-builder --chown=ryot:ryot /app/ryot /usr/local/bin/ryot
HEALTHCHECK --interval=5m --timeout=3s \
CMD curl -f http://localhost:5000/config || exit 1
CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf" ]
ENV API_URL=http://localhost:5000
CMD [ "concurrently", "--names", "frontend,backend,proxy", "-k", "npx remix-serve ./build/index.js", "ryot", "caddy run --config /etc/caddy/Caddyfile" ]

0 comments on commit 97b3a25

Please sign in to comment.