Skip to content

How can I build it using docker? #295

Answered by maximkrouk
maximkrouk asked this question in Q&A
Discussion options

You must be logged in to vote

I'll use this prototype for now

Dockerfile

FROM node:16

WORKDIR /app

RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm

# Files required by pnpm install
COPY .npmrc package.json pnpm-lock.yaml .

RUN pnpm install --frozen-lockfile --prod
RUN pnpm install esbuild

# Bundle app source
COPY . .

EXPOSE 8080

CMD ["pnpm", "prod"]

docker-compose.yml

version: '3.7'

# dont know if it's needed, took the template from vapor (server-side swift framework)
x-shared_environment: &shared_environment
  LOG_LEVEL: ${LOG_LEVEL:-debug}

services:
  frontend:
    image: capturecontext-frontend:latest
    build:
      context: capturecontext-frontend
    environment:
      <<: *shared_en…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by maximkrouk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant