3e092af6d8
* added dynamic system for ws connection to handle secure context and special web rules * Front: Fix Play on end * fix build and ws reverse proxy --------- Co-authored-by: Arthi-chaud <arthur.jamet@gmail.com>
24 lines
560 B
Docker
24 lines
560 B
Docker
# a Dockerfile to build the expo web app and serve it with nginx
|
|
#
|
|
# Build the app
|
|
FROM node:16-alpine as build
|
|
WORKDIR /app
|
|
COPY package.json yarn.lock ./
|
|
RUN yarn install
|
|
# install expo cli
|
|
RUN yarn global add expo-cli@6.0.5
|
|
# add sharp-cli (^2.1.0) for faster image processing
|
|
RUN yarn global add sharp-cli@^2.1.0
|
|
COPY . .
|
|
ARG API_URL
|
|
ENV API_URL=$API_URL
|
|
ARG SCORO_URL
|
|
ENV SCORO_URL=$SCORO_URL
|
|
|
|
RUN expo build:web
|
|
|
|
# Serve the app
|
|
FROM nginx:1.21-alpine
|
|
COPY --from=build /app/web-build /usr/share/nginx/html
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|