Compare commits
2 Commits
12b1c61628
...
6917ccf487
Author | SHA1 | Date | |
---|---|---|---|
6917ccf487
|
|||
1ed736d116
|
@@ -59,7 +59,7 @@ COPY --from=builder /usr/src/app/target/release/songparser .
|
|||||||
COPY --from=builder /usr/src/app/.env .
|
COPY --from=builder /usr/src/app/.env .
|
||||||
|
|
||||||
# Expose the port your Axum app listens on (e.g., 3000 or 8000)
|
# Expose the port your Axum app listens on (e.g., 3000 or 8000)
|
||||||
EXPOSE 3002
|
# EXPOSE 3000
|
||||||
|
|
||||||
# Set the command to run your application
|
# Set the command to run your application
|
||||||
# Ensure this matches the binary name copied above
|
# Ensure this matches the binary name copied above
|
||||||
|
@@ -2,14 +2,14 @@ version: '3.8' # Use a recent version
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
# Your Rust Application Service
|
# Your Rust Application Service
|
||||||
auth_api:
|
songparser:
|
||||||
build: # Tells docker-compose to build the Dockerfile in the current directory
|
build: # Tells docker-compose to build the Dockerfile in the current directory
|
||||||
context: .
|
context: .
|
||||||
ssh: ["default"] # Uses host's SSH agent
|
ssh: ["default"] # Uses host's SSH agent
|
||||||
container_name: songparser # Optional: Give the container a specific name
|
container_name: songparser # Optional: Give the container a specific name
|
||||||
ports:
|
# ports:
|
||||||
# Map host port 8000 to container port 3000 (adjust as needed)
|
# Map host port 8000 to container port 3000 (adjust as needed)
|
||||||
- "8002:3002"
|
# - "8002:3002"
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
restart: unless-stopped # Optional: Restart policy
|
restart: unless-stopped # Optional: Restart policy
|
||||||
|
@@ -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,
|
auth_uri: icarus_envy::environment::get_icarus_auth_base_api_url().await,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
println!("Base URL: {:?}", app.uri);
|
||||||
|
println!("Auth URL: {:?}", app.auth_uri);
|
||||||
|
|
||||||
match auth::get_token(&app).await {
|
match auth::get_token(&app).await {
|
||||||
Ok(login_result) => {
|
Ok(login_result) => {
|
||||||
app.token = login_result;
|
app.token = login_result;
|
||||||
@@ -27,8 +30,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
println!("Base URL: {:?}", app.uri);
|
|
||||||
println!("Auth URL: {:?}", app.auth_uri);
|
|
||||||
println!("Token: {:?}", app.token);
|
println!("Token: {:?}", app.token);
|
||||||
|
|
||||||
if auth::did_token_expire(&app.token).await {
|
if auth::did_token_expire(&app.token).await {
|
||||||
|
Reference in New Issue
Block a user