mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 13:39:01 +01:00 
			
		
		
		
	Added the USER_UID & USER_GID env variables
This commit is contained in:
		
							parent
							
								
									7edcd5d746
								
							
						
					
					
						commit
						8a43688a65
					
				@ -22,7 +22,7 @@ RUN set -x \
 | 
			
		||||
    && apk del .build-dependencies
 | 
			
		||||
 | 
			
		||||
# Some setup tools need to be kept
 | 
			
		||||
RUN apk add --no-cache su-exec
 | 
			
		||||
RUN apk add --no-cache su-exec shadow
 | 
			
		||||
 | 
			
		||||
# Bundle app source
 | 
			
		||||
COPY . .
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,7 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
[[ ! -z "${USER_UID}" ]] && usermod -u ${USER_UID} node || echo "No USER_UID specified, leaving 1000"
 | 
			
		||||
[[ ! -z "${USER_GID}" ]] && groupmod -g ${USER_GID} node || echo "No USER_GID specified, leaving 1000"
 | 
			
		||||
 | 
			
		||||
chown -R node:node /home/node
 | 
			
		||||
[ -d "$TRILIUM_DATA_DIR" ] && chown -R node:node "$TRILIUM_DATA_DIR"
 | 
			
		||||
su-exec node node ./src/www
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user