refactor(docker): improved docker config (#700)
This commit is contained in:
		
							parent
							
								
									02e68d3f56
								
							
						
					
					
						commit
						020e9cbe41
					
				
							
								
								
									
										5
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | |||||||
|  | node_modules | ||||||
|  | playwright-report | ||||||
|  | coverage | ||||||
|  | dist | ||||||
|  | test-results | ||||||
| @ -1,13 +1,16 @@ | |||||||
| # build stage | # build stage | ||||||
| FROM node:lts-alpine AS build-stage | FROM node:lts-alpine AS build-stage | ||||||
|  | # Set environment variables for non-interactive npm installs | ||||||
|  | ENV NPM_CONFIG_LOGLEVEL warn | ||||||
|  | ENV CI true | ||||||
| WORKDIR /app | WORKDIR /app | ||||||
|  | COPY package.json pnpm-lock.yaml ./ | ||||||
|  | RUN npm install -g pnpm && pnpm i --frozen-lockfile | ||||||
| COPY . . | COPY . . | ||||||
| RUN npm install -g pnpm |  | ||||||
| RUN pnpm i --frozen-lockfile |  | ||||||
| RUN pnpm build | RUN pnpm build | ||||||
| 
 | 
 | ||||||
| # production stage | # production stage | ||||||
| FROM nginx:stable-alpine AS production-stage | FROM nginxinc/nginx-unprivileged:stable-alpine AS production-stage | ||||||
| COPY --from=build-stage /app/dist /usr/share/nginx/html | COPY --from=build-stage /app/dist /usr/share/nginx/html | ||||||
| COPY nginx.conf /etc/nginx/conf.d/default.conf | COPY nginx.conf /etc/nginx/conf.d/default.conf | ||||||
| EXPOSE 80 | EXPOSE 80 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user