Skip to content

Commit

Permalink
add ci secrets for ENV, deprecate staging for Rocket.toml, change por…
Browse files Browse the repository at this point in the history
…t from 8000 to 8080
  • Loading branch information
TaeyoonKwon committed Feb 15, 2022
1 parent 0cb0892 commit 14f2d1b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ jobs:
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
env:
MONGO_URI: ${{secrets.MONGO_URI}}
MONGO_DB_NAME: ${{secrets.MONGO_DB_NAME}}
API_KEY: ${{secrets.API_KEY}}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rust-rocket-sample"
version = "1.1.0"
version = "1.2.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ COPY --from=builder /usr/local/cargo/bin/rust-rocket-sample /usr/local/bin/rust-
COPY --from=builder /app/.env .env
COPY --from=builder /app/Rocket.toml Rocket.toml

# ENV ROCKET_ADDRESS=0.0.0.0

EXPOSE 8000
EXPOSE 8080

CMD ["rust-rocket-sample"]
12 changes: 1 addition & 11 deletions Rocket.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,9 @@
# You should generate your own by "openssl rand -base64 32"
secret_key = "Yuvzw+jJ4yzKHi/JwHFl1y4X6Tjn/WrskHOWrlvt/L0="

[staging]
address = "0.0.0.0"
port = 8000
keep_alive = 5
read_timeout = 5
write_timeout = 5
log_level = "normal"
secret_key = "TDpuEwYtEz7xz/N+diE85A9kPkb0ZWQkvqTowxBepiI="
limits = { forms = 32768 }

[release]
address = "0.0.0.0"
port = 8000
port = 8080
keep_alive = 5
read_timeout = 5
write_timeout = 5
Expand Down

0 comments on commit 14f2d1b

Please sign in to comment.