Update reitti-install.sh
This commit is contained in:
parent
3e9d3b38de
commit
25c1b34826
@ -15,10 +15,10 @@ update_os
|
|||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
redis-server \
|
redis-server \
|
||||||
rabbitmq-server \
|
rabbitmq-server \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
zstd
|
zstd
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
JAVA_VERSION="24" setup_java
|
JAVA_VERSION="24" setup_java
|
||||||
@ -36,10 +36,10 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
|||||||
$STD sudo -u postgres psql -d "$DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS postgis;"
|
$STD sudo -u postgres psql -d "$DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS postgis;"
|
||||||
$STD sudo -u postgres psql -d "$DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"
|
$STD sudo -u postgres psql -d "$DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"
|
||||||
{
|
{
|
||||||
echo "Reitti Credentials"
|
echo "Reitti Credentials"
|
||||||
echo "Database Name: $DB_NAME"
|
echo "Database Name: $DB_NAME"
|
||||||
echo "Database User: $DB_USER"
|
echo "Database User: $DB_USER"
|
||||||
echo "Database Password: $DB_PASS"
|
echo "Database Password: $DB_PASS"
|
||||||
} >>~/reitti.creds
|
} >>~/reitti.creds
|
||||||
msg_ok "PostgreSQL Setup Completed"
|
msg_ok "PostgreSQL Setup Completed"
|
||||||
|
|
||||||
@ -52,10 +52,10 @@ $STD rabbitmqctl add_vhost "$RABBIT_VHOST"
|
|||||||
$STD rabbitmqctl set_permissions -p "$RABBIT_VHOST" "$RABBIT_USER" ".*" ".*" ".*"
|
$STD rabbitmqctl set_permissions -p "$RABBIT_VHOST" "$RABBIT_USER" ".*" ".*" ".*"
|
||||||
$STD rabbitmqctl set_user_tags "$RABBIT_USER" administrator
|
$STD rabbitmqctl set_user_tags "$RABBIT_USER" administrator
|
||||||
{
|
{
|
||||||
echo ""
|
echo ""
|
||||||
echo "Reitti Credentials"
|
echo "Reitti Credentials"
|
||||||
echo "RabbitMQ User: $RABBIT_USER"
|
echo "RabbitMQ User: $RABBIT_USER"
|
||||||
echo "RabbitMQ Password: $RABBIT_PASS"
|
echo "RabbitMQ Password: $RABBIT_PASS"
|
||||||
} >>~/reitti.creds
|
} >>~/reitti.creds
|
||||||
msg_ok "Configured RabbitMQ"
|
msg_ok "Configured RabbitMQ"
|
||||||
|
|
||||||
@ -65,44 +65,44 @@ USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "photon" "komoot/photon
|
|||||||
mv /opt/photon/photon-*.jar /opt/photon/photon.jar
|
mv /opt/photon/photon-*.jar /opt/photon/photon.jar
|
||||||
|
|
||||||
msg_info "Creating Reitti Configuration-File"
|
msg_info "Creating Reitti Configuration-File"
|
||||||
cat <<'EOF' >/opt/reitti/application.properties
|
cat <<EOF >/opt/reitti/application.properties
|
||||||
# ─── Database (PostgreSQL/PostGIS) ──────────────────────────────────
|
# PostgreSQL Database Connection
|
||||||
spring.datasource.url=jdbc:postgresql://${POSTGIS_HOST}:${POSTGIS_PORT}/${POSTGIS_DB}
|
spring.datasource.url=jdbc:postgresql://127.0.0.1:5432/$DB_NAME
|
||||||
spring.datasource.username=${POSTGIS_USER}
|
spring.datasource.username=$DB_USER
|
||||||
spring.datasource.password=${POSTGIS_PASSWORD}
|
spring.datasource.password=$DB_PASS
|
||||||
spring.datasource.driver-class-name=org.postgresql.Driver
|
spring.datasource.driver-class-name=org.postgresql.Driver
|
||||||
|
|
||||||
# ─── Flyway Migration ───────────────────────────────────────────────
|
# Flyway Database Migrations
|
||||||
spring.flyway.enabled=true
|
spring.flyway.enabled=true
|
||||||
spring.flyway.locations=classpath:db/migration
|
spring.flyway.locations=classpath:db/migration
|
||||||
spring.flyway.baseline-on-migrate=true
|
spring.flyway.baseline-on-migrate=true
|
||||||
|
|
||||||
# ─── RabbitMQ ───────────────────────────────────────────────────────
|
# RabbitMQ (Message Queue)
|
||||||
spring.rabbitmq.host=${RABBITMQ_HOST}
|
spring.rabbitmq.host=127.0.0.1
|
||||||
spring.rabbitmq.port=${RABBITMQ_PORT}
|
spring.rabbitmq.port=5672
|
||||||
spring.rabbitmq.username=${RABBITMQ_USER}
|
spring.rabbitmq.username=$RABBIT_USER
|
||||||
spring.rabbitmq.password=${RABBITMQ_PASSWORD}
|
spring.rabbitmq.password=$RABBIT_PASS
|
||||||
spring.rabbitmq.virtual-host=${RABBITMQ_VHOST}
|
|
||||||
|
|
||||||
# ─── Redis ─────────────────────────────────────────────────────────
|
# Redis (Cache)
|
||||||
spring.redis.host=${REDIS_HOST}
|
spring.data.redis.host=127.0.0.1
|
||||||
spring.redis.port=${REDIS_PORT}
|
spring.data.redis.port=6379
|
||||||
# spring.redis.username=${REDIS_USERNAME}
|
|
||||||
# spring.redis.password=${REDIS_PASSWORD}
|
|
||||||
|
|
||||||
# ─── Photon / Processing ────────────────────────────────────────────
|
# Server Port
|
||||||
reitti.photon.base-url=${PHOTON_BASE_URL}
|
server.port=8080
|
||||||
reitti.processing.wait-time=${PROCESSING_WAIT_TIME}
|
|
||||||
reitti.processing.batch-size=${PROCESSING_BATCH_SIZE}
|
|
||||||
reitti.processing.workers-per-queue=${PROCESSING_WORKERS_PER_QUEUE}
|
|
||||||
|
|
||||||
# ─── Application Server / Logging ───────────────────────────────────
|
# Optional: Logging & Performance
|
||||||
server.port=${SERVER_PORT}
|
logging.level.root=INFO
|
||||||
logging.level.root=${LOGGING_LEVEL}
|
|
||||||
|
|
||||||
# ─── Misc / Safety ─────────────────────────────────────────────────
|
|
||||||
reitti.dangerous-life=${DANGEROUS_LIFE}
|
|
||||||
spring.jpa.hibernate.ddl-auto=none
|
spring.jpa.hibernate.ddl-auto=none
|
||||||
|
spring.datasource.hikari.maximum-pool-size=10
|
||||||
|
|
||||||
|
# Photon (Geocoding)
|
||||||
|
PHOTON_BASE_URL=http://127.0.0.1:2322
|
||||||
|
PROCESSING_WAIT_TIME=15
|
||||||
|
PROCESSING_BATCH_SIZE=1000
|
||||||
|
PROCESSING_WORKERS_PER_QUEUE=4-16
|
||||||
|
|
||||||
|
# Disable potentially dangerous features unless needed
|
||||||
|
DANGEROUS_LIFE=false
|
||||||
EOF
|
EOF
|
||||||
msg_ok "Created Configuration-File for Reitti"
|
msg_ok "Created Configuration-File for Reitti"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user