Skip to content

Commit

Permalink
add production variables
Browse files Browse the repository at this point in the history
  • Loading branch information
JJponciano committed Mar 1, 2024
1 parent 3f81471 commit dab0272
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 4 deletions.
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -757,4 +757,84 @@ SELECT ?d ?itemID ?itemLabel ?coordinates WHERE { ?d rdf:type dcat:Dataset . ?d
SELECT ?f ?g ?wkt ?fp ?o WHERE { spalod:67504af5-5d32-4815-ae53-fb879f4bb0c7 spalod:hasFeature ?f. ?f geosparql:hasGeometry ?g. ?g geosparql:asWKT ?wkt . ?f ?fp ?o}
```

On azure:
```
/opt/apache-maven-3.9.3/bin/mvn package
export SPRING_PROFILES_ACTIVE=prod
/usr/local/bin/spalod-run.sh
#!/bin/bash
# timestamp
timestamp=$(date "+%Y.%m.%d-%H.%M.%S")
# run npm
cd /home/i3mainz/SpaLod/src/main/vue_js/spalod/
echo "Running npm..."
npm run dev -- --host > /var/log/npm_$timestamp.log 2>&1 &
echo $! > /var/run/npm.pid
cat /var/run/npm.pid
# run java jar
cd /home/i3mainz/SpaLod/
echo "Running java jar..."
/opt/apache-maven-3.9.3/bin/mvn package -DskipTests
java -jar target/spalod-0.0.1-SNAPSHOT.jar --spring.profiles.active=prod > /var/log/java_$timestamp.log 2>&1 &
echo $! > /var/run/java.pid
cat /var/run/java.pid
# run graphdb
echo "Running graphdb..."
/home/i3mainz/graphdb-10.2.1/bin/graphdb > /var/log/graphdb_$timestamp.log 2>&1 &
echo $! > /var/run/graphdb.pid
cat /var/run/graphdb.pid
/usr/local/bin/spalod-stop.sh
#!/bin/bash
# stop npm
if [ -f /var/run/npm.pid ]; then
echo "Stopping npm..."
kill -9 $(cat /var/run/npm.pid)
rm /var/run/npm.pid
fi
# stop java jar
if [ -f /var/run/java.pid ]; then
echo "Stopping java jar..."
kill -9 $(cat /var/run/java.pid)
rm /var/run/java.pid
fi
# stop graphdb
if [ -f /var/run/graphdb.pid ]; then
echo "Stopping graphdb..."
kill -9 $(cat /var/run/graphdb.pid)
rm /var/run/graphdb.pid
fi
/usr/local/bin/spalod-run.sh
#!/bin/bash
# timestamp
timestamp=$(date "+%Y.%m.%d-%H.%M.%S")
# run npm
cd /home/i3mainz/SpaLod/src/main/vue_js/spalod/
echo "Running npm..."
npm run dev -- --host > /var/log/npm_$timestamp.log 2>&1 &
echo $! > /var/run/npm.pid
cat /var/run/npm.pid
# run java jar
cd /home/i3mainz/SpaLod/
echo "Running java jar..."
/opt/apache-maven-3.9.3/bin/mvn package -DskipTests
java -jar target/spalod-0.0.1-SNAPSHOT.jar --spring.profiles.active=prod > /var/log/java_$timestamp.log 2>&1 &
echo $! > /var/run/java.pid
cat /var/run/java.pid
# run graphdb
echo "Running graphdb..."
/home/i3mainz/graphdb-10.2.1/bin/graphdb > /var/log/graphdb_$timestamp.log 2>&1 &
echo $! > /var/run/graphdb.pid
cat /var/run/graphdb.pid
```
8 changes: 4 additions & 4 deletions application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ spring:
spring:
profiles: prod
application:
VITE_APP_GRAPH_DB: http://localhost:7200
VITE_APP_API_BASE_URL: https://localhost:8081
VITE_APP_GRAPH_DB: https://spalod.northeurope.cloudapp.azure.com:7200
VITE_APP_API_BASE_URL: https://spalod.northeurope.cloudapp.azure.com:8081
VITE_APP_FRONT_BASE_URL: https://spalod.northeurope.cloudapp.azure.com:8080
GRAPHDB_QUERY_ENDPOINT: http://localhost:7200/repositories/Spalod
GRAPHDB_UPDATE_ENDPOINT: http://localhost:7200/repositories/Spalod/statements
GRAPHDB_QUERY_ENDPOINT: https://spalod.northeurope.cloudapp.azure.com:7200/repositories/Spalod
GRAPHDB_UPDATE_ENDPOINT: https://spalod.northeurope.cloudapp.azure.com:7200/repositories/Spalod/statements
security:
oauth2:
client:
Expand Down
Binary file modified src/.DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions src/main/vue_js/spalod/.env_prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VITE_APP_API_BASE_URL=https://spalod.northeurope.cloudapp.azure.com:8081
VITE_APP_GRAPH_DB=https://spalod.northeurope.cloudapp.azure.com:7200

0 comments on commit dab0272

Please sign in to comment.