diff --git a/apps/rust/Dockerfile b/apps/rust/Dockerfile index b496b9c..9bb2df3 100644 --- a/apps/rust/Dockerfile +++ b/apps/rust/Dockerfile @@ -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 \ No newline at end of file +EXPOSE 8080 + +CMD ["/backend"] \ No newline at end of file diff --git a/apps/rust/src/main.rs b/apps/rust/src/main.rs index e62d82a..c73c130 100644 --- a/apps/rust/src/main.rs +++ b/apps/rust/src/main.rs @@ -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| { diff --git a/compose.yaml b/compose.yaml index 5d8931b..c4c5ba2 100644 --- a/compose.yaml +++ b/compose.yaml @@ -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: diff --git a/do_app_spec.yaml b/do_app_spec.yaml index 120c383..1db5d6c 100644 --- a/do_app_spec.yaml +++ b/do_app_spec.yaml @@ -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