Skip to content

Commit

Permalink
fix docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Jul 9, 2023
1 parent 1c1ab1b commit 45d8949
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
7 changes: 6 additions & 1 deletion backend/windmill-api/src/oauth2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,14 @@ pub fn build_oauth_clients(base_url: &str) -> anyhow::Result<AllClients> {
} else if std::path::Path::new(path).exists() {
fs::read_to_string(path).map_err(to_anyhow)?
} else {
"{}".to_string()
tracing::warn!("oauth.json not found, no OAuth clients loaded");
return Ok(AllClients { logins: HashMap::new(), connects: HashMap::new(), slack: None });
};

if content.is_empty() {
tracing::warn!("oauth.json is empty, no OAuth clients loaded");
return Ok(AllClients { logins: HashMap::new(), connects: HashMap::new(), slack: None });
};
let oauths: HashMap<String, OAuthClient> =
match serde_json::from_str::<HashMap<String, OAuthClient>>(&content) {
Ok(clients) => clients,
Expand Down
10 changes: 4 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ services:
retries: 5

windmill_server:
# Use ghcr.io/windmill-labs/windmill-ee:main for the ee
image: ${WM_IMAGE}
pull_policy: always
deploy:
Expand All @@ -45,10 +44,9 @@ services:
condition: service_healthy
volumes:
# See Oauth (https://docs.windmill.dev/docs/misc/setup_oauth)
# - ./oauth.json:/usr/src/app/oauth.json
- ./oauth.json:/usr/src/app/oauth.json

windmill_worker:
# Use ghcr.io/windmill-labs/windmill-ee:main for the ee
image: ${WM_IMAGE}
pull_policy: always
deploy:
Expand All @@ -73,7 +71,7 @@ services:
# mount the docker socket to allow to run docker containers from within the workers
- /var/run/docker.sock:/var/run/docker.sock
# See Oauth (https://docs.windmill.dev/docs/misc/setup_oauth)
# - ./oauth.json:/usr/src/app/oauth.json
- ./oauth.json:/usr/src/app/oauth.json

## This worker is specialized for "native" jobs. Jobs that are lightweight and run "in-process" and can thus be parallelized to more than 1 at a time on a given worker
windmill_worker_native:
Expand All @@ -97,9 +95,9 @@ services:
depends_on:
db:
condition: service_healthy
# volumes:
volumes:
# See Oauth (https://docs.windmill.dev/docs/misc/setup_oauth)
# - ./oauth.json:/usr/src/app/oauth.json
- ./oauth.json:/usr/src/app/oauth.json


lsp:
Expand Down

0 comments on commit 45d8949

Please sign in to comment.