【发布时间】:2020-10-11 02:17:10
【问题描述】:
我这样写了 Dockerfile,然后我将它推送到 GCP 上的 Container Registory
FROM node:13.12.0-alpine as builder
RUN mkdir -p /usr/src/nuxt-app
WORKDIR /usr/src/nuxt-app
RUN apk update && apk upgrade
RUN apk add --update --no-cache python make g++
COPY . /usr/src/nuxt-app
RUN rm -rf ./node_modules && npm install
RUN npm run build
EXPOSE 3000
ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=3000
ARG API_ENDPOINT
ENV API_ENDPOINT $API_ENDPOINT
CMD [ "npm", "start" ]
我在 gce 实例上部署了 docekr 映像。我可以使用 http://:3000 访问应用程序。但我最终想做的是使用 https:// 访问应用程序。我不知道该怎么办。
【问题讨论】:
标签: node.js google-cloud-platform google-compute-engine nuxt.js