Skip to content

Commit

Permalink
Adding a new user
Browse files Browse the repository at this point in the history
  • Loading branch information
Astitva committed Mar 3, 2024
1 parent 11c8fb5 commit 839cc84
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
3 changes: 2 additions & 1 deletion docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ CLIENT_SECRET='xx'
OAUTH_SECRET='random-secret-string'
CLIENT_CONFIG='/home/Desktop/DTaaS/deploy/config/client/env.local.js'
username1='user1'
username2='user2'
username2='user2'
username3='user3'
15 changes: 14 additions & 1 deletion docker/compose.users.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
version: '3'
services:

user3:
image: mltooling/ml-workspace-minimal:0.13.2
volumes:
- ${DTAAS_DIR}/files/common:/workspace/common
- ${DTAAS_DIR}/files/${username3}:/workspace
environment:
- AUTHENTICATE_VIA_JUPYTER=
- WORKSPACE_BASE_URL=${username3}
shm_size: 512m
labels:
- "traefik.enable=true"
- "traefik.http.routers.u3.entryPoints=web"
- "traefik.http.routers.u3.rule=PathPrefix(`/${username3}`)"
- "traefik.http.routers.u3.middlewares=traefik-forward-auth"
5 changes: 4 additions & 1 deletion docker/conf.local
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ rule.onlyu1.action=allow
rule.onlyu1.rule=PathPrefix(`/user1`)

rule.onlyu2.action=allow
rule.onlyu2.rule=PathPrefix(`/user2`)
rule.onlyu2.rule=PathPrefix(`/user2`)

rule.onlyu3.action=allow
rule.onlyu3.rule=PathPrefix(`/user3`)
6 changes: 5 additions & 1 deletion docker/conf.server
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ rule.onlyu1.whitelist = [email protected]

rule.onlyu2.action=auth
rule.onlyu2.rule=PathPrefix(`/user2`)
rule.onlyu2.whitelist = [email protected]
rule.onlyu2.whitelist = [email protected]

rule.onlyu3.action=auth
rule.onlyu3.rule=PathPrefix(`/user3`)
rule.onlyu3.whitelist = [email protected]

0 comments on commit 839cc84

Please sign in to comment.