commit
						ce080f4d22
					
				
					 7 changed files with 39 additions and 23 deletions
				
			
		|  | @ -35,12 +35,8 @@ Om de applicatie lokaal te draaien als kant-en-klare Docker-containers: | ||||||
| ```bash | ```bash | ||||||
| docker compose version | docker compose version | ||||||
| git clone https://github.com/SELab-2/Dwengo-1.git | git clone https://github.com/SELab-2/Dwengo-1.git | ||||||
| cd Dwengo-1/backend |  | ||||||
| cp .env.example .env |  | ||||||
| # Pas .env aan |  | ||||||
| nano .env |  | ||||||
| cd .. |  | ||||||
| docker compose -f compose.staging.yml up --build | docker compose -f compose.staging.yml up --build | ||||||
|  | # Gebruikt backend/.env.staging | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| ### Handmatige installatie en ontwikkeling | ### Handmatige installatie en ontwikkeling | ||||||
|  |  | ||||||
							
								
								
									
										21
									
								
								backend/.env.staging
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								backend/.env.staging
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,21 @@ | ||||||
|  | PORT=3000 | ||||||
|  | DWENGO_DB_HOST=db | ||||||
|  | DWENGO_DB_PORT=5432 | ||||||
|  | DWENGO_DB_USERNAME=postgres | ||||||
|  | DWENGO_DB_PASSWORD=postgres | ||||||
|  | DWENGO_DB_UPDATE=false | ||||||
|  | 
 | ||||||
|  | DWENGO_AUTH_STUDENT_URL=http://localhost/idp/realms/student | ||||||
|  | DWENGO_AUTH_STUDENT_CLIENT_ID=dwengo | ||||||
|  | DWENGO_AUTH_STUDENT_JWKS_ENDPOINT=http://idp:7080/idp/realms/student/protocol/openid-connect/certs | ||||||
|  | DWENGO_AUTH_TEACHER_URL=http://localhost/idp/realms/teacher | ||||||
|  | DWENGO_AUTH_TEACHER_CLIENT_ID=dwengo | ||||||
|  | DWENGO_AUTH_TEACHER_JWKS_ENDPOINT=http://idp:7080/idp/realms/teacher/protocol/openid-connect/certs | ||||||
|  | 
 | ||||||
|  | # Allow Vite dev-server to access the backend (for testing purposes). Don't forget to remove this in production! | ||||||
|  | #DWENGO_CORS_ALLOWED_ORIGINS=http://localhost/,127.0.0.1:80,http://127.0.0.1,http://localhost:80,http://127.0.0.1:80,localhost | ||||||
|  | DWENGO_CORS_ALLOWED_ORIGINS=http://localhost/*,http://idp:7080,https://idp:7080 | ||||||
|  | 
 | ||||||
|  | # Logging and monitoring | ||||||
|  | 
 | ||||||
|  | LOKI_HOST=http://logging:3102 | ||||||
|  | @ -1,3 +1,13 @@ | ||||||
| PORT=3000 | # | ||||||
| DWENGO_DB_UPDATE=true | # Test environment configuration | ||||||
|  | # | ||||||
|  | # Should not need to be modified. | ||||||
|  | # See .env.example for more information. | ||||||
|  | # | ||||||
|  | 
 | ||||||
|  | ### Dwengo ### | ||||||
|  | 
 | ||||||
|  | DWENGO_PORT=3000 | ||||||
|  | 
 | ||||||
| DWENGO_DB_NAME=":memory:" | DWENGO_DB_NAME=":memory:" | ||||||
|  | DWENGO_DB_UPDATE=true | ||||||
|  |  | ||||||
|  | @ -1,13 +0,0 @@ | ||||||
| # |  | ||||||
| # Test environment configuration |  | ||||||
| # |  | ||||||
| # Should not need to be modified. |  | ||||||
| # See .env.example for more information. |  | ||||||
| # |  | ||||||
| 
 |  | ||||||
| ### Dwengo ### |  | ||||||
| 
 |  | ||||||
| DWENGO_PORT=3000 |  | ||||||
| 
 |  | ||||||
| DWENGO_DB_NAME=":memory:" |  | ||||||
| DWENGO_DB_UPDATE=true |  | ||||||
|  | @ -34,7 +34,9 @@ npm run test:unit | ||||||
| 
 | 
 | ||||||
| ```shell | ```shell | ||||||
| # Omgevingsvariabelen | # Omgevingsvariabelen | ||||||
| cp .env.development.example .env | cp .env.example .env | ||||||
|  | # Configureer de .env file met de juiste waarden! | ||||||
|  | nano .env | ||||||
| 
 | 
 | ||||||
| npm run build | npm run build | ||||||
| npm run start | npm run start | ||||||
|  |  | ||||||
|  | @ -4,6 +4,6 @@ export default defineConfig({ | ||||||
|     test: { |     test: { | ||||||
|         environment: 'node', |         environment: 'node', | ||||||
|         globals: true, |         globals: true, | ||||||
|         testTimeout: 10000, |         testTimeout: 100000, | ||||||
|     }, |     }, | ||||||
| }); | }); | ||||||
|  |  | ||||||
|  | @ -24,7 +24,7 @@ services: | ||||||
|             - '3000:3000/tcp' |             - '3000:3000/tcp' | ||||||
|         restart: unless-stopped |         restart: unless-stopped | ||||||
|         volumes: |         volumes: | ||||||
|             - ./backend/.env:/app/.env |             - ./backend/.env.staging:/app/.env | ||||||
|         depends_on: |         depends_on: | ||||||
|             - db |             - db | ||||||
|             - logging |             - logging | ||||||
|  |  | ||||||
		Reference in a new issue
	
	 GitHub
							GitHub