mirror of
				https://git.collinwebdesigns.de/oscar.krause/fastapi-dls.git
				synced 2025-10-26 18:05:28 +03:00 
			
		
		
		
	README.md
This commit is contained in:
		
							parent
							
								
									802366e9ff
								
							
						
					
					
						commit
						fdaedacfa5
					
				
							
								
								
									
										37
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										37
									
								
								README.md
									
									
									
									
									
								
							| @ -36,10 +36,45 @@ There are some more internal api endpoints for handling authentication and lease | |||||||
| WORKING_DIR=/opt/docker/fastapi-dls/cert | WORKING_DIR=/opt/docker/fastapi-dls/cert | ||||||
| mkdir -p $WORKING_DIR | mkdir -p $WORKING_DIR | ||||||
| cd $WORKING_DIR | cd $WORKING_DIR | ||||||
|  | # create instance private and public key for singing JWT's | ||||||
| openssl genrsa -out $WORKING_DIR/instance.private.pem 2048  | openssl genrsa -out $WORKING_DIR/instance.private.pem 2048  | ||||||
| openssl rsa -in $WORKING_DIR/instance.private.pem -outform PEM -pubout -out $WORKING_DIR/instance.public.pem | openssl rsa -in $WORKING_DIR/instance.private.pem -outform PEM -pubout -out $WORKING_DIR/instance.public.pem | ||||||
|  | # create ssl certificate for integrated webserver (uvicorn) - because clients rely on ssl | ||||||
| openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout  $WORKING_DIR/webserver.key -out $WORKING_DIR/webserver.crt | openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout  $WORKING_DIR/webserver.key -out $WORKING_DIR/webserver.crt | ||||||
| docker run -e DLS_URL=`hostname -i` -e DLS_PORT=443 -p 443:443 -v $WORKING_DIR:/app/cert collinwebdesigns/fastapi-dls:latest | ``` | ||||||
|  | 
 | ||||||
|  | **Start container** | ||||||
|  | 
 | ||||||
|  | ```shell | ||||||
|  | docker volume create dls-db | ||||||
|  | docker run -e DLS_URL=`hostname -i` -e DLS_PORT=443 -p 443:443 -v $WORKING_DIR:/app/cert -v dls-db:/app/database collinwebdesigns/fastapi-dls:latest | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | **Docker-Compose / Deploy stack** | ||||||
|  | 
 | ||||||
|  | ```yaml | ||||||
|  | version: '3.9' | ||||||
|  | 
 | ||||||
|  | x-dls-variables: &dls-variables | ||||||
|  |   DLS_URL: localhost # REQUIRED | ||||||
|  |   DLS_PORT: 443 | ||||||
|  |   LEASE_EXPIRE_DAYS: 90 | ||||||
|  |   DATABASE: sqlite:////app/database/db.sqlite | ||||||
|  | 
 | ||||||
|  | services: | ||||||
|  |   dls: | ||||||
|  |     image: collinwebdesigns/fastapi-dls:latest | ||||||
|  |     restart: always | ||||||
|  |     environment: | ||||||
|  |       <<: *dls-variables | ||||||
|  |     ports: | ||||||
|  |       - "443:443" | ||||||
|  |     volumes: | ||||||
|  |       - /opt/docker/fastapi-dls/cert:/app/cert | ||||||
|  |       - dls-db:/app/database | ||||||
|  | 
 | ||||||
|  | volumes: | ||||||
|  |   dls-db: | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| # Configuration | # Configuration | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Oscar Krause
						Oscar Krause