Add configuration to run docker as worker

This commit is contained in:
Max Wofford
2025-02-18 10:28:55 -05:00
parent 149c636025
commit b109e2a0b5

View File

@@ -70,6 +70,10 @@ USER 1000:1000
# Entrypoint prepares the database.
ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start server via Thruster by default, this can be overwritten at runtime
# Start either web server or job worker based on WORKER env var
EXPOSE 80
CMD ["./bin/thrust", "./bin/rails", "server"]
CMD if [ "$WORKER" = "true" ]; then \
./bin/jobs start; \
else \
./bin/thrust ./bin/rails server; \
fi