-
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
774d90a
commit 37d00fa
Showing
4 changed files
with
44 additions
and
5 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
**/target/ | ||
**/node_modules/ | ||
crates/web/frontend/pkg | ||
Dockerfile | ||
**Dockerfile | ||
docker-compose.yml | ||
LICENSE | ||
README.md | ||
README.md | ||
# we do our own version pinning in the Dockerfile | ||
rust-toolchain.toml |
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 |
---|---|---|
@@ -1,6 +1,25 @@ | ||
services: | ||
gq-playground: | ||
build: ./ | ||
build: | ||
context: . | ||
dockerfile: docker/playground.Dockerfile | ||
image: gq-playground | ||
ports: | ||
- 3000:3000 | ||
gq-server: | ||
build: | ||
context: . | ||
dockerfile: docker/server.Dockerfile | ||
image: gq-server | ||
ports: | ||
- 3001:3000 | ||
environment: | ||
DATABASE_URL: postgres://postgres:password@db:5432/db | ||
depends_on: | ||
- db | ||
db: | ||
image: docker.io/postgres:16 | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DB: db |
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,18 @@ | ||
FROM rust:1.81 AS chef | ||
WORKDIR /app | ||
RUN cargo install cargo-chef --version 0.1.67 --locked | ||
|
||
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 --package gq-server --release --recipe-path recipe.json | ||
COPY . . | ||
RUN cargo build --package gq-server --release | ||
|
||
FROM debian:bookworm | ||
WORKDIR /app | ||
COPY --from=builder /app/target/release/gq-server . | ||
CMD [ "./gq-server" ] |