* INFRA-4076 | Ashvin | Add availability zone field This will let users choose the AWS AZ they want to deploy their services in. Backend and kutegen already supported this feature, see this for details https://github.com/navi-infra/kutegen/pull/218 * INFRA-4076 | Ashvin | Show AdvancedDeploymentConfigurationCard in all environments * INFRA-4076 | Ashvin | Add all AZ to new manifest
32 lines
1023 B
Docker
32 lines
1023 B
Docker
FROM 193044292705.dkr.ecr.ap-south-1.amazonaws.com/common/node:18.15.0-alpine3.16 as build
|
|
WORKDIR /app
|
|
COPY . /app
|
|
RUN yarn install
|
|
RUN yarn build
|
|
|
|
FROM 193044292705.dkr.ecr.ap-south-1.amazonaws.com/common/nginx:1.23.3-alpine
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
COPY --from=build /app/public /usr/share/nginx/html/public
|
|
RUN adduser -u 4000 non-root-user -D ''
|
|
RUN chown -R 4000:4000 /var/cache/nginx \
|
|
&& chown -R 4000:4000 /usr/share/nginx \
|
|
&& chmod -R g+w /var/cache/nginx \
|
|
&& touch /var/run/nginx.pid \
|
|
&& chown -R 4000:4000 /var/run/nginx.pid \
|
|
&& ln -sf /dev/stdout /var/log/nginx/access.log \
|
|
&& ln -sf /dev/stderr /var/log/nginx/error.log
|
|
RUN rm /etc/nginx/conf.d/default.conf
|
|
USER 4000
|
|
COPY nginx/nginx.conf /etc/nginx/conf.d
|
|
COPY entrypoint.sh /
|
|
COPY config.template.js /usr/share/nginx/html/config.js
|
|
USER 0
|
|
RUN chown -R 4000:4000 /etc/nginx/conf.d \
|
|
&& chmod +x /entrypoint.sh
|
|
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
|
USER 4000
|
|
|
|
CMD ["nginx", "-g", "daemon off;"] |