Skip to content

Commit

Permalink
Bump up spring boot version
Browse files Browse the repository at this point in the history
  • Loading branch information
callicoder committed Jun 21, 2019
1 parent e20fca8 commit d775309
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 4 deletions.
3 changes: 3 additions & 0 deletions polling-app-client/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git
node_modules
build
34 changes: 32 additions & 2 deletions polling-app-client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
FROM nginx:1.15.10-alpine
COPY ./build /var/www
#### Stage 1: Build the react application
FROM node:12.4.0-alpine as build

# Configure the main working directory inside the docker image.
# This is the base directory used in any further RUN, COPY, and ENTRYPOINT
# commands.
WORKDIR /app

# Copy the package.json as well as the package-lock.json and install
# the dependencies. This is a separate step so the dependencies
# will be cached unless changes to one of those two files
# are made.
COPY package.json package-lock.json ./
RUN npm install

# Copy the main application
COPY . ./

# Build the application
RUN npm run build

#### Stage 2: Serve the React application from Nginx
FROM nginx:1.17.0-alpine

# Copy the react build from Stage 1
COPY --from=build /app/build /var/www

# Copy our custom nginx config
COPY nginx.conf /etc/nginx/nginx.conf

# Expose port 3000 to the Docker host, so we can access it
# from the outside.
EXPOSE 80

ENTRYPOINT ["nginx","-g","daemon off;"]
4 changes: 3 additions & 1 deletion polling-app-client/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ http {
server {
# listen on port 80
listen 80;

# save logs here
access_log /var/log/nginx/access.log compression;

# where the root here
# nginx root directory
root /var/www;

# what file to server as index
index index.html index.htm;

Expand Down
2 changes: 1 addition & 1 deletion polling-app-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
<version>2.1.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

Expand Down

0 comments on commit d775309

Please sign in to comment.