Front dockerfile (#88)
* readding react-native-paper because expo build need it * added Dockerfile with nginx.conf for hosting * added front to docker-compose prod
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# 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
|
||||
# add sharp-cli (^2.1.0) for faster image processing
|
||||
RUN yarn global add sharp-cli@^2.1.0
|
||||
COPY . .
|
||||
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
|
||||
Reference in New Issue
Block a user