diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..672f299 --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/sqlx-data.json b/sqlx-data.json new file mode 100644 index 0000000..a415764 --- /dev/null +++ b/sqlx-data.json @@ -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" + } +} \ No newline at end of file