Compare commits

...

2 Commits

Author SHA1 Message Date
6917ccf487 tsk-42: Dockerized the service
All checks were successful
Rust Build / Check (pull_request) Successful in 35s
Rust Build / Rustfmt (pull_request) Successful in 31s
Rust Build / Test Suite (pull_request) Successful in 22s
Rust Build / Clippy (pull_request) Successful in 26s
Rust Build / build (pull_request) Successful in 48s
2025-08-16 18:39:57 -04:00
1ed736d116 tsk-42: Updating exposed port for docker 2025-08-16 15:41:48 -04:00
3 changed files with 7 additions and 6 deletions

View File

@@ -59,7 +59,7 @@ COPY --from=builder /usr/src/app/target/release/songparser .
COPY --from=builder /usr/src/app/.env .
# Expose the port your Axum app listens on (e.g., 3000 or 8000)
EXPOSE 3002
# EXPOSE 3000
# Set the command to run your application
# Ensure this matches the binary name copied above

View File

@@ -2,14 +2,14 @@ version: '3.8' # Use a recent version
services:
# Your Rust Application Service
auth_api:
songparser:
build: # Tells docker-compose to build the Dockerfile in the current directory
context: .
ssh: ["default"] # Uses host's SSH agent
container_name: songparser # Optional: Give the container a specific name
ports:
# ports:
# Map host port 8000 to container port 3000 (adjust as needed)
- "8002:3002"
# - "8002:3002"
env_file:
- .env
restart: unless-stopped # Optional: Restart policy

View File

@@ -16,6 +16,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
auth_uri: icarus_envy::environment::get_icarus_auth_base_api_url().await,
..Default::default()
};
println!("Base URL: {:?}", app.uri);
println!("Auth URL: {:?}", app.auth_uri);
match auth::get_token(&app).await {
Ok(login_result) => {
app.token = login_result;
@@ -27,8 +30,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
};
loop {
println!("Base URL: {:?}", app.uri);
println!("Auth URL: {:?}", app.auth_uri);
println!("Token: {:?}", app.token);
if auth::did_token_expire(&app.token).await {