chore(deployment): use docker to deploy katbin

Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
Amogh Lele 2021-06-24 15:20:45 +05:30
parent d718dea2b0
commit d4d26e2882
No known key found for this signature in database
GPG Key ID: 02A1D73C0EE5E788
3 changed files with 9 additions and 3 deletions

5
.dockerignore Normal file
View File

@ -0,0 +1,5 @@
/target
.idea
.env
.cargo
*.dump

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
/target /target
.idea .idea
.env .env
.cargo .cargo
*.dump

View File

@ -1,7 +1,7 @@
FROM rustlang/rust:nightly as build FROM rustlang/rust:nightly
COPY . . COPY . .
RUN cargo build --release RUN cargo build --release
CMD ["sh", "-c", "ROCKET_PORT=$PORT ROCKET_KEEP_ALIVE=0 ./target/release/katbin"] CMD ["sh", "-c", "ROCKET_KEEP_ALIVE=0 ./target/release/katbin"]