Compare commits
2 commits
9ed576b552
...
c3b185b592
Author | SHA1 | Date | |
---|---|---|---|
c3b185b592 | |||
e2045d31d6 |
5 changed files with 44 additions and 2 deletions
13
.dockerignore
Normal file
13
.dockerignore
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
/target
|
||||||
|
/out
|
||||||
|
|
||||||
|
/.env
|
||||||
|
/api.http
|
||||||
|
|
||||||
|
/emgauwa-*.sqlite
|
||||||
|
/emgauwa-*.sqlite-*
|
||||||
|
/emgauwa-*.json
|
||||||
|
|
||||||
|
/.dockerignore
|
||||||
|
/Dockerfile
|
||||||
|
/docker-bake.hcl
|
BIN
Cargo.lock
generated
BIN
Cargo.lock
generated
Binary file not shown.
|
@ -12,7 +12,6 @@ actix = "0.13"
|
||||||
tokio = { version = "1.34", features = ["io-std", "macros", "rt-multi-thread"] }
|
tokio = { version = "1.34", features = ["io-std", "macros", "rt-multi-thread"] }
|
||||||
tokio-tungstenite = "0.21"
|
tokio-tungstenite = "0.21"
|
||||||
|
|
||||||
simple_logger = "4.3"
|
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
||||||
chrono = { version = "0.4", features = ["serde"] }
|
chrono = { version = "0.4", features = ["serde"] }
|
||||||
|
@ -22,7 +21,7 @@ serde = "1.0"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde_derive = "1.0"
|
serde_derive = "1.0"
|
||||||
|
|
||||||
sqlx = { version = "0.7", features = ["sqlite", "runtime-tokio", "macros", "chrono"] }
|
sqlx = { version = "0.7", features = ["sqlite", "runtime-tokio", "macros"] }
|
||||||
|
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
futures-channel = "0.3"
|
futures-channel = "0.3"
|
||||||
|
|
15
Dockerfile
Normal file
15
Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
FROM rust:1 as builder
|
||||||
|
|
||||||
|
RUN rustup target add x86_64-unknown-linux-musl && \
|
||||||
|
apt update && \
|
||||||
|
apt install -y musl-tools musl-dev && \
|
||||||
|
update-ca-certificates
|
||||||
|
|
||||||
|
COPY ./ /emgauwa
|
||||||
|
WORKDIR /emgauwa
|
||||||
|
RUN cargo build --target x86_64-unknown-linux-musl --release
|
||||||
|
|
||||||
|
FROM scratch
|
||||||
|
COPY --from=builder /emgauwa/target/x86_64-unknown-linux-musl/release/emgauwa-controller /usr/bin/emgauwa-controller
|
||||||
|
|
||||||
|
CMD ["/usr/bin/emgauwa-controller"]
|
15
docker-bake.hcl
Normal file
15
docker-bake.hcl
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
variable "REG" {
|
||||||
|
default = "registry.serguzim.me"
|
||||||
|
}
|
||||||
|
variable "REPO" {
|
||||||
|
default = "emgauwa/controller"
|
||||||
|
}
|
||||||
|
variable "TAG" {
|
||||||
|
default = "latest"
|
||||||
|
}
|
||||||
|
|
||||||
|
target "default" {
|
||||||
|
output = ["type=docker"]
|
||||||
|
dockerfile = "./Dockerfile"
|
||||||
|
tags = ["${REG}/${REPO}:latest", "${REG}/${REPO}:${TAG}"]
|
||||||
|
}
|
Loading…
Reference in a new issue