Chore/server prs (#197)

* build(deps): bump com.puppycrawl.tools:checkstyle in /server

Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 10.20.1 to 10.20.2.
- [Release notes](https://github.com/checkstyle/checkstyle/releases)
- [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-10.20.1...checkstyle-10.20.2)

---
updated-dependencies:
- dependency-name: com.puppycrawl.tools:checkstyle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump org.springframework.boot:spring-boot-starter-parent

Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.3.5 to 3.3.6.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.3.5...v3.3.6)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* docs: add cloud native compile command to tools

* docs: improve tools for backend and scripts

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
2024-12-04 08:31:44 -03:00
committed by GitHub
co-authored by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
parent 0af136088a
commit 8b3e8a5829
4 changed files with 44 additions and 6 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.5</version>
<version>3.3.6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
@@ -416,7 +416,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.20.1</version>
<version>10.20.2</version>
</dependency>
</dependencies>
<configuration>
+25
View File
@@ -1,3 +1,28 @@
#!/bin/bash
DOCKER_IMG="server:nightly"
docker image inspect $DOCKER_IMG --format="ignore me"
if [ $? -eq 1 ]; then
echo "Image not found locally! Building it..."
if [ ! -f "server/.env" ]; then
echo "No env file found for back-end. Creating one for you.."
bash tools/run-create-env.sh "back"
else
echo "Env file in place. Moving on.."
fi
echo "Getting env vars and making them visible"
cd server/
export $(cat .env | xargs)
echo "Done!"
cd ..
docker build --file server/Dockerfile.dev --tag server:nightly .
else
echo "Image found! Let's keep going."
fi
docker run -it --rm --name server -e CHECK="TRUE" -v ./server:/app server:nightly
+12 -1
View File
@@ -3,6 +3,11 @@
TARGET="$1"
if [ "$TARGET" == "back" ]; then
if [ -f "server/.env" ]; then
echo "Env file in place. Leaving..."
exit 0
fi
echo "Creating basic env file for database and back-end"
cd server
@@ -13,7 +18,12 @@ if [ "$TARGET" == "back" ]; then
echo "POSTGRES_PORT=5432" >> .env
echo "SERVER_SERVLET_CONTEXT_PATH=/" >> .env
echo "CORS_ALLOWED_ORIGINS=http://localhost:5000" >> .env
if [ "$TARGET" == "front" ]; then
elif [ "$TARGET" == "front" ]; then
if [ -f "client/.env" ]; then
echo "Env file in place. Leaving..."
exit 0
fi
echo "Creating basic env file for the front-end app"
cd client
@@ -22,4 +32,5 @@ if [ "$TARGET" == "front" ]; then
else
echo "Wrong parameter..."
fi
echo "Done!"
+5 -3
View File
@@ -46,16 +46,16 @@ Here are a few steps:
```bash
export SERVER_IP=
export SERVER_ADDRRESS=
export SERVER_ADDRESS=
npm ci --ignore-scripts --no-update-notifier --omit=dev
export VITE_BACKEND_SERVER=$SERVER_ADDRRESS/server
export VITE_BACKEND_SERVER=$SERVER_ADDRESS/server
npm run build
zip -r "client_$VERSION.zip" dist/
scp "client_$VERSION.zip" root@$SERVER_IP:/root/
```
## Runing with Docker
## Running with Docker
**DB:**
@@ -86,6 +86,8 @@ docker run -d --rm \
ghcr.io/ricardo-campos-org/react-typescript-todolist/server:<PR-Number>
```
Build Cloud Native: `./mvnw -B package -Pnative -DskipTests`
**Client:**
The frontend app will run on Nginx.