Skip to content

Commit

Permalink
chore: revamp
Browse files Browse the repository at this point in the history
  • Loading branch information
hseeberger committed Nov 17, 2023
1 parent c9874f2 commit ad91264
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Determine version
id: version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Determine version
id: version
Expand Down
4 changes: 2 additions & 2 deletions hello-tracing-backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG RUST_VERSION=1.73.0
ARG RUST_VERSION=1.74.0

FROM rust:${RUST_VERSION}-bullseye AS builder
RUN apt-get update && \
Expand All @@ -12,4 +12,4 @@ COPY --from=builder /root/hello-tracing-rs/target/release/hello-tracing-backend
COPY --from=builder /root/hello-tracing-rs/hello-tracing-backend/config /opt/hello-tracing-backend/config
WORKDIR /opt/hello-tracing-backend
ENTRYPOINT ["hello-tracing-backend"]
EXPOSE 80/tcp
EXPOSE 8080/tcp
2 changes: 1 addition & 1 deletion hello-tracing-backend/config/default.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
api:
addr: 0.0.0.0
port: 80
port: 8080

tracing:
service-name: hello-tracing-backend
Expand Down
4 changes: 2 additions & 2 deletions hello-tracing-gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG RUST_VERSION=1.73.0
ARG RUST_VERSION=1.74.0

FROM rust:${RUST_VERSION}-bullseye AS builder
RUN apt-get update && \
Expand All @@ -12,4 +12,4 @@ COPY --from=builder /root/hello-tracing-rs/target/release/hello-tracing-gateway
COPY --from=builder /root/hello-tracing-rs/hello-tracing-gateway/config /opt/hello-tracing-gateway/config
WORKDIR /opt/hello-tracing-gateway
ENTRYPOINT ["hello-tracing-gateway"]
EXPOSE 80/tcp
EXPOSE 8080/tcp
4 changes: 2 additions & 2 deletions hello-tracing-gateway/config/default.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
api:
addr: 0.0.0.0
port: 80
port: 8080

backend:
endpoint: http://localhost:90
# endpoint: ...

tracing:
service-name: hello-tracing-gateway
Expand Down
16 changes: 8 additions & 8 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ fix:

all: check fmt lint test

run-gateway:
run-gateway port="8080" backend_port="8081":
RUST_LOG=hello_tracing_gateway=debug,info \
CONFIG_DIR=hello-tracing-gateway/config \
APP__API__PORT=8080 \
APP__BACKEND__ENDPOINT=http://localhost:8090 \
APP__API__PORT={{port}} \
APP__BACKEND__ENDPOINT=http://localhost:{{backend_port}} \
cargo run -p hello-tracing-gateway \
> $HOME/tmp/hello-tracing-gateway.log

run-backend:
run-backend port="8081":
RUST_LOG=hello_tracing_backend=debug,info \
CONFIG_DIR=hello-tracing-backend/config \
APP__API__PORT=8090 \
APP__API__PORT={{port}} \
cargo run -p hello-tracing-backend \
> $HOME/tmp/hello-tracing-backend.log

docker:
docker tag="latest":
docker build \
-t hseeberger/hello-tracing-backend \
-t hseeberger/hello-tracing-backend:{{tag}} \
-f hello-tracing-backend/Dockerfile \
.
docker build \
-t hseeberger/hello-tracing-gateway \
-t hseeberger/hello-tracing-gateway:{{tag}} \
-f hello-tracing-gateway/Dockerfile \
.
5 changes: 3 additions & 2 deletions release.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pre-release-commit-message = "release"
tag-message = "release[{{crate_name}}]: {{version}}"
pre-release-commit-message = "build({{crate_name}}): release version {{version}}"
tag-message = "release {{crate_name}} version {{version}}"
consolidate-commits = false

0 comments on commit ad91264

Please sign in to comment.