Merge branch 'main' into ogp

This commit is contained in:
Emi Simpson 2021-10-25 21:03:06 -04:00
commit ba154abd16
Signed by: Emi
GPG Key ID: A12F2C2FFDC3D847
4 changed files with 15 additions and 2 deletions

View File

@ -1,7 +1,7 @@
[package]
name = "pronouns_today_web"
name = "pronouns-today-web"
version = "0.1.0"
edition = "2021"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

10
web/Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM rust:1.56-alpine3.13 AS builder
RUN apk update
RUN apk add musl-dev
ADD . .
WORKDIR web
RUN cargo build --target=x86_64-unknown-linux-musl --release
FROM scratch
COPY --from=builder target/x86_64-unknown-linux-musl/release/pronouns_today_web /
CMD ["/pronouns_today_web"]

2
web/build-docker.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
docker build .. -t 'pronouns_today_web' -f Dockerfile

View File

@ -139,6 +139,7 @@ async fn not_found() -> impl Responder {
#[actix_web::main]
async fn main() -> std::io::Result<()> {
env_logger::init();
println!("Starting pronouns-today-web on 127.0.0.1:8080");
HttpServer::new(|| {
let logger = Logger::default();
let app = App::new()