Created
July 4, 2020 15:01
-
-
Save rs-ds/5f6a26dc962d4224b2728433aad0b1ac to your computer and use it in GitHub Desktop.
SSR Frontend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
# This is ONLY for apps that needs to support SSR. | |
# If you don't use SSR, folow S3_FRONTEND_DEPLOYMENT.md to deploy directly on s3 | |
ssrfrontend: | |
env_file: .env | |
restart: always | |
build: ./ssrfrontend # Change this to your frontend path. ed: ../my/frontent/path | |
command: PORT=${SSRFRONTEND_PORT} npm run serve:ssr | |
expose: | |
- ${SSRFRONTEND_PORT} | |
labels: | |
- traefik.enable=true | |
- traefik.backend.domain=${SSRFRONTEND_DOMAIN} | |
- traefik.frontend.rule=Host:${SSRFRONTEND_DOMAIN} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:10.16.3-jessie-slim | |
WORKDIR /app | |
COPY package*.json ./ | |
RUN npm install | |
COPY . . | |
RUN npm run build:ssr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment