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:
Clément Le Bihan
2022-10-25 18:43:36 +01:00
committed by GitHub
parent 284da8b8c7
commit bce5088d3c
6 changed files with 91 additions and 3 deletions
+18
View File
@@ -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