Skip to content

Commit

Permalink
docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
rachana-egov committed Jan 17, 2024
1 parent 0bd3119 commit 66d2101
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
17 changes: 17 additions & 0 deletions flutter/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Docker flutter tags https://hub.docker.com/r/cirrusci/flutter/tags?page=1&name=1.16

FROM cirrusci/flutter:3.7.7 AS build
ARG WORK_DIR
WORKDIR /app
# copy the project files
COPY ${WORK_DIR} .
RUN flutter doctor
RUN flutter clean
RUN flutter pub get
RUN flutter build web
# Create runtime image
FROM nginx:mainline-alpine
ENV WEB_DIR=/var/web/widgetbook
#RUN mkdir -p ${WEB_DIR}
COPY --from=build /app/build/web/ ${WEB_DIR}/
COPY --from=build /app/docker/nginx.conf /etc/nginx/conf.d/default.conf
12 changes: 12 additions & 0 deletions flutter/docker/ngnix.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
server
{
listen 80;
underscores_in_headers on;
server_tokens off;
location /widgetbook
{
root /var/web;
index index.html index.htm;
try_files $uri $uri/ /works-shg-app/index.html;
}
}

0 comments on commit 66d2101

Please sign in to comment.