File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,15 @@ COPY package-lock.json .
77RUN npm ci --silent
88# Copy app files
99COPY . ./
10+ # Args passed on build phase
11+ ARG GOOGLE_MAPS_API_KEY
12+ ARG API_HOST
13+ ENV REACT_APP_GOOGLE_MAPS_API_KEY $GOOGLE_MAPS_API_KEY
14+ ENV REACT_APP_API_HOST $API_HOST
1015RUN npm run build
1116
1217
1318FROM nginx:stable-alpine
1419COPY --from=build /app/build /usr/share/nginx/html
15- COPY env.sh /docker-entrypoint.d
16- RUN chmod +x /docker-entrypoint.d/env.sh
1720EXPOSE 80
1821CMD ["nginx" , "-g" , "daemon off;" ]
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ Maps (Google Maps)
1717 ```
1818## Docker
1919
20- ` docker compose --env-file .env up -d `
20+ ` docker build -t ghcr.io/zxcv32/capture-maps-ui:main --build-arg GOOGLE_MAPS_API_KEY='<API_KEY>' --build-arg API_HOST='<host>' . `
21+ ` docker compose up -d `
2122
2223![ img.png] ( assets/img.png )
2324
Original file line number Diff line number Diff line change @@ -3,8 +3,5 @@ services:
33 capture-maps-ui :
44 image : ghcr.io/zxcv32/capture-maps-ui:main
55 restart : unless-stopped
6- environment :
7- REACT_APP_GOOGLE_MAPS_API_KEY : " ${REACT_APP_GOOGLE_MAPS_API_KEY}"
8- REACT_APP_API_HOST : " ${REACT_APP_API_HOST}"
96 ports :
107 - 9001:80
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments