Tried adding it as build args. In retrospect I believe I was doing it right before but was adding it at the wrong build stage.
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Docker Build & Publish / Build Docker (push) Successful in 1m6s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Docker Build & Publish / Build Docker (push) Successful in 1m6s
				
			This commit is contained in:
		
							parent
							
								
									f5ce2dbc71
								
							
						
					
					
						commit
						adfd1e9b82
					
				@ -34,5 +34,5 @@ jobs:
 | 
				
			|||||||
          context: .
 | 
					          context: .
 | 
				
			||||||
          push: true
 | 
					          push: true
 | 
				
			||||||
          tags: gitea.rannes.dev/rannes.dev/local-weather:latest
 | 
					          tags: gitea.rannes.dev/rannes.dev/local-weather:latest
 | 
				
			||||||
          secrets: |
 | 
					          build-args: |
 | 
				
			||||||
            "places_api=${{ secrets.PLACES_API }}"
 | 
					            PLACES_API=${{ secrets.PLACES_API }}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										11
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								Dockerfile
									
									
									
									
									
								
							@ -1,15 +1,10 @@
 | 
				
			|||||||
# syntax=docker/dockerfile:1.3
 | 
					# syntax=docker/dockerfile:1.3
 | 
				
			||||||
FROM node:18-alpine AS base
 | 
					FROM node:18-alpine AS base
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
FROM base AS deps
 | 
					FROM base AS deps
 | 
				
			||||||
RUN apk add --no-cache libc6-compat
 | 
					RUN apk add --no-cache libc6-compat
 | 
				
			||||||
WORKDIR /app
 | 
					WORKDIR /app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Debug: List files in current directory
 | 
					 | 
				
			||||||
RUN ls -la
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
 | 
					COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
 | 
				
			||||||
RUN ls -la  # List files after copying to confirm presence
 | 
					RUN ls -la  # List files after copying to confirm presence
 | 
				
			||||||
RUN \
 | 
					RUN \
 | 
				
			||||||
@ -36,11 +31,9 @@ RUN \
 | 
				
			|||||||
FROM base AS runner
 | 
					FROM base AS runner
 | 
				
			||||||
WORKDIR /app
 | 
					WORKDIR /app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Mount environment variables
 | 
					 | 
				
			||||||
RUN --mount=type=secret,id=places_api \
 | 
					 | 
				
			||||||
  cat /run/secrets/places_api
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
ENV NODE_ENV production
 | 
					ENV NODE_ENV production
 | 
				
			||||||
 | 
					ARG PLACES_API
 | 
				
			||||||
 | 
					ENV PLACES_API ${PLACES_API}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN addgroup --system --gid 1001 nodejs
 | 
					RUN addgroup --system --gid 1001 nodejs
 | 
				
			||||||
RUN adduser --system --uid 1001 nextjs
 | 
					RUN adduser --system --uid 1001 nextjs
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user