DePlOyMeNt iS ThE EaSy pArT

This commit is contained in:
2020-05-21 20:27:55 +02:00
parent 6365616386
commit 6a93251d81
5 changed files with 200 additions and 719 deletions

4
.dockerignore Normal file
View File

@@ -0,0 +1,4 @@
target/
Dockerfile
deployment.yml
Makefile

891
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -7,8 +7,9 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
telegram-bot = { git = "https://github.com/telegram-rs/telegram-bot" }
# telegram-bot = { git = "https://github.com/telegram-rs/telegram-bot" }
telegram-bot = "0.7.0"
dotenv = "0.15.0"
tokio = "^0.2.0-alpha.6"
futures-preview = { version = "=0.3.0-alpha.19", features = ["async-await"] }
tokio = { version="^0.2.0", features=["macros"] }
futures = "^0.3.5"

10
Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM rust:1.43 as builder
WORKDIR /usr/src/sarcastifybot
COPY . .
RUN cargo install --path .
FROM debian:buster
RUN apt-get update && apt-get install -y openssl ca-certificates
COPY --from=builder /usr/local/cargo/bin/sarcastifybot /usr/local/bin/sarcastifybot
CMD ["sarcastifybot"]

7
Makefile Normal file
View File

@@ -0,0 +1,7 @@
IMAGE_TAG=harbor.blacknova.io/nvls/sarcastifybot:latest
image:
docker build -t $(IMAGE_TAG) .
push:
docker push $(IMAGE_TAG)