Compare commits
5 commits
c75b0628c2
...
ba154abd16
Author | SHA1 | Date | |
---|---|---|---|
Emi Simpson | ba154abd16 | ||
Emi Simpson | 8d8a92a0b5 | ||
6378adba7a | |||
45c6eb39bb | |||
af85dc7dcf |
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pronouns_today_web"
|
name = "pronouns-today-web"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2018"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
|
10
web/Dockerfile
Normal file
10
web/Dockerfile
Normal 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
2
web/build-docker.sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
docker build .. -t 'pronouns_today_web' -f Dockerfile
|
|
@ -139,6 +139,7 @@ async fn not_found() -> impl Responder {
|
||||||
#[actix_web::main]
|
#[actix_web::main]
|
||||||
async fn main() -> std::io::Result<()> {
|
async fn main() -> std::io::Result<()> {
|
||||||
env_logger::init();
|
env_logger::init();
|
||||||
|
println!("Starting pronouns-today-web on 127.0.0.1:8080");
|
||||||
HttpServer::new(|| {
|
HttpServer::new(|| {
|
||||||
let logger = Logger::default();
|
let logger = Logger::default();
|
||||||
let app = App::new()
|
let app = App::new()
|
||||||
|
|
Loading…
Reference in a new issue