25 lines
702 B
Docker
Executable File
25 lines
702 B
Docker
Executable File
FROM dollhouse-base:latest AS backend-builder
|
|
|
|
RUN cargo install diesel_cli --no-default-features --features postgres
|
|
|
|
COPY . .
|
|
RUN cargo build --release --bin dollhouse-backend
|
|
|
|
FROM ubuntu:24.04 AS runtime
|
|
WORKDIR /app
|
|
|
|
COPY docker/dollhouse-backend/entrypoint.sh .
|
|
COPY --from=backend-builder /app/target/release/dollhouse-backend /usr/local/bin/backend
|
|
COPY --from=backend-builder /usr/local/cargo/bin/diesel ./diesel
|
|
COPY crates/dollhouse-db/migrations ./migrations
|
|
COPY crates/dollhouse-db/diesel.toml .
|
|
|
|
RUN apt-get update && apt install -y \
|
|
libpq-dev \
|
|
liblua5.3-dev \
|
|
lua5.3 && \
|
|
rm -rf /var/lib/apt/lists/* \
|
|
&& chmod +x ./entrypoint.sh
|
|
|
|
ENTRYPOINT [ "./entrypoint.sh" ]
|