Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Select the image to build based on SERVER_TYPE, defaulting to fastapi_server, or docker-compose build args
ARG SERVER_TYPE=fastapi_server
# Select the image to build based on SERVER_TYPE, defaulting to fba_server, or docker-compose build args
ARG SERVER_TYPE=fba_server

# === Python environment from uv ===
FROM ghcr.io/astral-sh/uv:python3.10-bookworm-slim AS builder
Expand Down Expand Up @@ -41,22 +41,22 @@ COPY deploy/backend/supervisord.conf /etc/supervisor/supervisord.conf
WORKDIR /fba/backend

# === FastAPI server image ===
FROM base_server AS fastapi_server
FROM base_server AS fba_server

COPY deploy/backend/fba_server.conf /etc/supervisor/conf.d/

RUN mkdir -p /var/log/fastapi_server
RUN mkdir -p /var/log/fba

EXPOSE 8001

CMD ["/usr/local/bin/granian", "main:app", "--interface", "asgi", "--host", "0.0.0.0", "--port","8000"]

# === Celery server image ===
FROM base_server AS celery
FROM base_server AS fba_celery

COPY deploy/backend/fba_celery.conf /etc/supervisor/conf.d/

RUN mkdir -p /var/log/celery
RUN mkdir -p /var/log/fba

RUN chmod +x celery-start.sh

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ services:
context: .
dockerfile: Dockerfile
args:
- SERVER_TYPE=celery
- SERVER_TYPE=fba_celery
image: fba_celery:latest
ports:
- "8555:8555"
Expand Down