Skip to content

Commit f33b751

Browse files
committed
passed some environment variables to the project
1 parent 662426f commit f33b751

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: dockerfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ RUN yarn global add @angular/cli@latest
1414
# RUN npm install @angular/cli@latest -g
1515

1616
# install packages
17-
# RUN yarn add
1817
RUN yarn install
1918

20-
#for npm
19+
# FOR NPM
2120
# npm install
2221

2322
# SET ENVIRONMENT VARIABLES
24-
ENV environment=production
23+
ENV ENVIRONMENT=production1
24+
ENV SomeAPIKey="This is not an API Key"
25+
ENV SomeOtherAPIKey="This is not another API Key"
2526

2627
# Build Angular Application in Production
2728
RUN ng build --prod
@@ -34,6 +35,7 @@ FROM nginx:alpine
3435
VOLUME /var/cache/nginx
3536

3637
# Copy the build files from the project
38+
# replace "angular-docker-environment-variables" with your angular project name
3739
COPY --from=builder /app/dist/angular-docker-environment-variables /usr/share/nginx/html
3840

3941
# Copy Nginx Files

0 commit comments

Comments
 (0)