Skip to content

Commit

Permalink
port 0.0.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
karambarakat committed Oct 19, 2023
1 parent ad45ecc commit eebb6a5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions apps/rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ RUN cargo build --release --target x86_64-unknown-linux-musl

FROM scratch
COPY --from=builder /backend/target/x86_64-unknown-linux-musl/release/backend /backend
ENTRYPOINT ["/backend"]
EXPOSE 8080
EXPOSE 8080

CMD ["/backend"]
2 changes: 1 addition & 1 deletion apps/rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async fn main() -> std::io::Result<()> {
)
.default_service(web::to(|| async { crate::errors::MyErrors::NotFound }))
})
.bind(("127.0.0.1", port))?
.bind(("0.0.0.0", port))?
.run()
.await
.map_err(|val| {
Expand Down
4 changes: 2 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ services:
build:
context: .
dockerfile: apps/rust/Dockerfile
command: ['sleep', 'infinity']
# command: ['/usr/dist/backend']
# command: ['sleep', 'infinity']
command: ['/backend']
ports:
- 8090:8080
environment:
Expand Down
10 changes: 5 additions & 5 deletions do_app_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ services:
- dockerfile_path: apps/rust/Dockerfile
envs:
- key: DATABASE_URL
scope: RUN_AND_BUILD_TIME
scope: RUN_TIME
value: ${db.DATABASE_URL}
- key: JWT_SALT
scope: RUN_AND_BUILD_TIME
scope: RUN_TIME
type: SECRET
value: EV[1:e/Lbi4p3D4nga2b5Fhy/BuzNY/B9dzHJ:Bp04PbhCr0dEgg/SdX5CKRlcCtOjVQ==]
- key: SALT
scope: RUN_AND_BUILD_TIME
scope: RUN_TIME
type: SECRET
value: EV[1:kwG/LSezpusG9V5fOyr68hDiyJnPRQK+:B7IlyYxa5kzj7guUBhLgWA2j3v1gwA==]
- key: FE_URL
scope: RUN_AND_BUILD_TIME
scope: RUN_TIME
value: tracker.karam.page
- key: PORT
scope: RUN_AND_BUILD_TIME
scope: RUN_TIME
value: "8080"
github:
branch: prod
Expand Down

0 comments on commit eebb6a5

Please sign in to comment.