Skip to content
This repository has been archived by the owner on Jul 13, 2019. It is now read-only.

Commit

Permalink
Rename client and server directories
Browse files Browse the repository at this point in the history
  • Loading branch information
George Black committed Apr 21, 2019
1 parent 256a4fb commit 0a1aacb
Show file tree
Hide file tree
Showing 37 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ MAINTAINER George Black <[email protected]>

RUN mkdir -p /app/public

COPY path-to-run-server/target/*.jar /app/path-to-run.jar
COPY path-to-run-client/dist/* /app/public/
COPY server/target/*.jar /app/path-to-run.jar
COPY client/dist/* /app/public/

CMD ["java", "-jar", "/app/path-to-run.jar"]
EXPOSE 8080
10 changes: 5 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pipeline {
stages {
stage('Install Dependencies') {
steps {
dir('path-to-run-client') {
dir('client') {
sh '''
npm install -g parcel-bundler
npm install
Expand All @@ -31,14 +31,14 @@ pipeline {
}
stage('Lint Client') {
steps {
dir('path-to-run-client') {
dir('client') {
sh 'npm run lint'
}
}
}
stage('Build Client') {
steps {
dir('path-to-run-client') {
dir('client') {
sh 'npm run build'
}
}
Expand All @@ -53,7 +53,7 @@ pipeline {
}
}
steps {
dir('path-to-run-server') {
dir('server') {
sh '''
mvn clean install \
-DSTRAVA_CLIENT_ID=${STRAVA_CLIENT_ID} \
Expand All @@ -66,7 +66,7 @@ pipeline {
stage('Archive Artifact') {
agent any
steps {
archiveArtifacts 'path-to-run-server/target/*.jar'
archiveArtifacts 'server/target/*.jar'
}
}
stage('Build Docker Image') {
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ docker container run -d \

Build client:
```
cd path-to-run-client
cd client
npm install -g parcel-bundler
npm install
npm run build
```

Build server:
```
cd path-to-run-server
cd server
mvn clean install
```

Run application on 8080:
```
cd path-to-run-server
cd server
java -jar target/*.jar
```
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion path-to-run-client/package.json → client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "eslint src/**.{js,vue} src/**/*.{js,vue}",
"lint:fix": "eslint src/**.{js,vue} src/**/*.{js,vue} --fix",
"clean": "rm -rf dist node_modules *.log .cache",
"copy": "cp -r ./dist/* ../path-to-run-server/src/main/resources/public/"
"copy": "cp -r ./dist/* ../server/src/main/resources/public/"
},
"dependencies": {
"lodash.isempty": "^4.4.0",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ spring.datasource.username=pathtorun
spring.datasource.password=abc123

### Static Content ###
spring.resources.static-locations=file:../path-to-run-client/dist/
spring.resources.static-locations=file:../client/dist/

0 comments on commit 0a1aacb

Please sign in to comment.