Files
supabase/studio/Dockerfile
T
CoppleandJoshen Lim 55b82433e9 Adds a docker build (#4121)
* Adds a docker build

* Adds the correct tags

* Sets up the studio port

* Adds quotes around false

* hide local env

* make sure we cover all env files

* only run sentry & analyzer on platform

* Update withAuth

* fixing multi-stage

* fix usage commands

* adds some fake service and anon keys

* Small fix

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2021-11-29 17:19:39 +08:00

30 lines
631 B
Docker

## USAGE:
# Build: docker build --target production -t supabase/studio:latest .
# Run: docker run -p 3000:3000 supabase/studio
# Deploy: docker push supabase/studio:latest
# Clean build:
# docker build --target production --no-cache -t supabase/studio:latest .
# docker builder prune
FROM node:14 as base
WORKDIR /usr/src/app
COPY package*.json ./
FROM base as build
ENV NODE_ENV=build
RUN npm install
COPY . .
RUN npm run build
FROM build as dev
ENV NODE_ENV=dev
EXPOSE 8082
CMD [ "npm", "run", "dev" ]
FROM build as production
ENV NODE_ENV=production
COPY . .
EXPOSE 3000
CMD ["npm", "start"]