-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da2d673
commit c686f53
Showing
4 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: '3.9' | ||
|
||
services: | ||
server: | ||
container_name: binge-at-home-server | ||
build: | ||
context: ./server | ||
dockerfile: ../docker/server/Dockerfile | ||
ports: | ||
- "8000:8000" | ||
|
||
client: | ||
container_name: binge-at-home-client | ||
build: | ||
context: ./client | ||
dockerfile: ../docker/client/Dockerfile | ||
ports: | ||
- "4000:4000" | ||
environment: | ||
- PORT=4000 | ||
depends_on: | ||
- server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM node:20.2.0-bullseye-slim as builder | ||
|
||
WORKDIR /app | ||
COPY . ./ | ||
|
||
RUN npm ci --no-audit | ||
RUN npm run build | ||
|
||
FROM node:20.2.0-bullseye-slim | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /app/package*.json ./ | ||
COPY --from=builder /app/.output ./ | ||
|
||
# clean install dependencies, no devDependencies, no prepare script | ||
RUN npm ci --omit=dev --ignore-scripts --no-audit --loglevel verbose | ||
|
||
EXPOSE 3000 | ||
CMD ["node", "./server/index.mjs"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM lukemathwalker/cargo-chef:latest-rust-1-alpine AS chef | ||
WORKDIR /app | ||
|
||
FROM chef AS planner | ||
COPY . . | ||
RUN cargo chef prepare --recipe-path recipe.json | ||
|
||
FROM chef AS builder | ||
COPY --from=planner /app/recipe.json recipe.json | ||
RUN cargo chef cook --release --recipe-path recipe.json | ||
COPY . . | ||
RUN cargo build --release --bin binge-at-home | ||
|
||
FROM debian:bullseye AS runtime | ||
WORKDIR /app | ||
COPY --from=builder /app/target/release/binge-at-home /usr/local/bin | ||
ENTRYPOINT ["/usr/local/bin/binge-at-home"] |