init
This commit is contained in:
24
dollhouse/docker/dollhouse-backend/Dockerfile
Executable file
24
dollhouse/docker/dollhouse-backend/Dockerfile
Executable file
@@ -0,0 +1,24 @@
|
||||
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" ]
|
||||
6
dollhouse/docker/dollhouse-backend/entrypoint.sh
Executable file
6
dollhouse/docker/dollhouse-backend/entrypoint.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
./diesel setup || exit 1
|
||||
exec /usr/local/bin/backend
|
||||
Reference in New Issue
Block a user