Skip to content

Commit

Permalink
Add docker build file
Browse files Browse the repository at this point in the history
  • Loading branch information
vjousse committed Sep 15, 2023
1 parent 4e9a3ab commit da9313b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# We use the latest Rust stable release as base image
FROM rust:1.72.0
# Let's switch our working directory to `app` (equivalent to `cd app`)
# The `app` folder will be created for us by Docker in case it does not
# exist already.
WORKDIR /app
# Install the required system dependencies for our linking configuration
RUN apt update && apt install lld clang -y

# Copy all files from our working environment to our Docker image
COPY . .
ENV SQLX_OFFLINE true
# Let's build our binary!
# We'll use the release profile to make it faaaast
RUN cargo build --release
# When `docker run` is executed, launch the binary!
ENTRYPOINT ["./target/release/zero2prod"]
18 changes: 18 additions & 0 deletions sqlx-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"db": "PostgreSQL",
"7fd01c52effb1d23f5e242b9a8d05564de3c7a1178c1c2f5f056490e3d704736": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Left": [
"Uuid",
"Text",
"Text",
"Timestamptz"
]
}
},
"query": "\nINSERT INTO subscriptions (id, email, name, subscribed_at)\nVALUES ($1, $2, $3, $4)\n"
}
}

0 comments on commit da9313b

Please sign in to comment.