diff --git a/.env.sample b/.env.sample index ef1d3d8..1fed438 100644 --- a/.env.sample +++ b/.env.sample @@ -18,6 +18,9 @@ MSSQL_ENABLED="1" # Comment out if you are using keycloak or oidc COMPOSE_FILE="$COMPOSE_FILE:compose.local-users.yml" +# Share the local user database with other instances +#COMPOSE_FILE="$COMPOSE_FILE:compose.local-users-shared.yml" +#LOCAL_USERS_VOLUME=rstudio_example_com_users # OpenID Connect (SSO) #COMPOSE_FILE="$COMPOSE_FILE:compose.oidc.yml" diff --git a/compose.local-users-shared.yml b/compose.local-users-shared.yml new file mode 100644 index 0000000..85dce76 --- /dev/null +++ b/compose.local-users-shared.yml @@ -0,0 +1,7 @@ +--- +version: "3.8" + +volumes: + users: + external: true + name: ${LOCAL_USERS_VOLUME} diff --git a/entrypoint.sh.tmpl b/entrypoint.sh.tmpl index 1c8ec66..7b74ffc 100644 --- a/entrypoint.sh.tmpl +++ b/entrypoint.sh.tmpl @@ -28,9 +28,9 @@ cp /opt/users/group /etc/group || true copy_users() { while true; do - cp /etc/passwd /opt/users/passwd - cp /etc/shadow /opt/users/shadow - cp /etc/group /opt/users/group + cp -u /etc/passwd /opt/users/passwd + cp -u /etc/shadow /opt/users/shadow + cp -u /etc/group /opt/users/group sleep 60 done }