mirror of
https://github.com/Sheldan/OnePlusBot.git
synced 2026-01-01 23:35:23 +00:00
[OPB-xxx] restructuring to use local postgres container for dev purposes
adding debug options to local dev version removing deprecated flag from tilt file
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -22,5 +22,7 @@ target/
|
|||||||
*.rar
|
*.rar
|
||||||
*.tgz
|
*.tgz
|
||||||
|
|
||||||
|
Chart.lock
|
||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
|||||||
3
.tiltignore
Normal file
3
.tiltignore
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
*.tgz
|
||||||
|
tilt/oneplusbot-dev/tmpcharts/
|
||||||
|
tilt/oneplusbot-dev/charts/*.tgz
|
||||||
5
Tiltfile
5
Tiltfile
@@ -18,7 +18,7 @@ local_resource(
|
|||||||
docker_build_with_restart(
|
docker_build_with_restart(
|
||||||
registry + 'oneplus-bot-image',
|
registry + 'oneplus-bot-image',
|
||||||
'./application/executable/target/jar',
|
'./application/executable/target/jar',
|
||||||
entrypoint=['java', '-noverify', '-cp', '.:./lib/*', 'dev.sheldan.oneplus.bot.executable.Application'],
|
entrypoint=['java', '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005', '-cp', '.:./lib/*', 'dev.sheldan.oneplus.bot.executable.Application'],
|
||||||
dockerfile='./application/executable/Dockerfile',
|
dockerfile='./application/executable/Dockerfile',
|
||||||
live_update=[
|
live_update=[
|
||||||
sync('./application/executable/target/jar/BOOT-INF/lib', '/app/lib'),
|
sync('./application/executable/target/jar/BOOT-INF/lib', '/app/lib'),
|
||||||
@@ -33,7 +33,8 @@ docker_build(registry + 'oneplus-bot-template-data', 'deployment/image-packaging
|
|||||||
docker_build(registry + 'oneplus-bot-private-rest-api', 'deployment/image-packaging/src/main/docker/private-rest-api/', build_args={'REGISTRY_PREFIX': abstracto_registry})
|
docker_build(registry + 'oneplus-bot-private-rest-api', 'deployment/image-packaging/src/main/docker/private-rest-api/', build_args={'REGISTRY_PREFIX': abstracto_registry})
|
||||||
|
|
||||||
|
|
||||||
k8s_yaml(helm('deployment/helm/oneplus-bot', values=
|
local('cd tilt/oneplusbot-dev && helm dep up')
|
||||||
|
k8s_yaml(helm('tilt/oneplusbot-dev', values=
|
||||||
['./../OnePlusBot-environments/argocd/apps/oneplus-bot/values/local/values.yaml',
|
['./../OnePlusBot-environments/argocd/apps/oneplus-bot/values/local/values.yaml',
|
||||||
'secrets://./../OnePlusBot-environments/argocd/apps/oneplus-bot/values/local/values.secrets.yaml']
|
'secrets://./../OnePlusBot-environments/argocd/apps/oneplus-bot/values/local/values.secrets.yaml']
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ spring.datasource.url=jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}
|
|||||||
spring.datasource.username= ${DB_USER}
|
spring.datasource.username= ${DB_USER}
|
||||||
spring.datasource.password= ${DB_PASS}
|
spring.datasource.password= ${DB_PASS}
|
||||||
spring.datasource.hikari.maximum-pool-size=${hikariPoolSize}
|
spring.datasource.hikari.maximum-pool-size=${hikariPoolSize}
|
||||||
spring.jpa.hibernate.default_schema=abstracto
|
spring.jpa.hibernate.default_schema=${DB_SCHEMA}
|
||||||
spring.jpa.properties.hibernate.default_schema=abstracto
|
spring.jpa.properties.hibernate.default_schema=${DB_SCHEMA}
|
||||||
spring.quartz.jdbc.initialize-schema=never
|
spring.quartz.jdbc.initialize-schema=never
|
||||||
management.metrics.tags.application=OnePlusBot
|
management.metrics.tags.application=OnePlusBot
|
||||||
management.endpoint.health.probes.enabled=true
|
management.endpoint.health.probes.enabled=true
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ spec:
|
|||||||
name: db-credentials
|
name: db-credentials
|
||||||
key: dbName
|
key: dbName
|
||||||
- name: DB_SCHEME
|
- name: DB_SCHEME
|
||||||
value: "abstracto"
|
value: {{ .Values.dbCredentials.schema }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: "/var/db-config/"
|
- mountPath: "/var/db-config/"
|
||||||
name: database-config-mount
|
name: database-config-mount
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: db-credentials
|
name: db-credentials
|
||||||
key: dbName
|
key: dbName
|
||||||
|
- name: DB_SCHEMA
|
||||||
|
value: {{ .Values.dbCredentials.schema }}
|
||||||
- name: NEWS_FORUM_POST_NOTIFICATION_SERVER_ID
|
- name: NEWS_FORUM_POST_NOTIFICATION_SERVER_ID
|
||||||
value: "{{ .Values.bot.config.newsForumPostNotificationServerId }}"
|
value: "{{ .Values.bot.config.newsForumPostNotificationServerId }}"
|
||||||
- name: TOKEN
|
- name: TOKEN
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ spec:
|
|||||||
name: db-credentials
|
name: db-credentials
|
||||||
key: dbName
|
key: dbName
|
||||||
- name: DB_SCHEME
|
- name: DB_SCHEME
|
||||||
value: "abstracto."
|
value: "{{ .Values.dbCredentials.schema }}."
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: "/var/template-config/"
|
- mountPath: "/var/template-config/"
|
||||||
name: template-config-mount
|
name: template-config-mount
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ dbCredentials:
|
|||||||
userName: null
|
userName: null
|
||||||
password: null
|
password: null
|
||||||
name: null
|
name: null
|
||||||
|
schema: abstracto
|
||||||
privateRestApi:
|
privateRestApi:
|
||||||
enabled: true
|
enabled: true
|
||||||
repository: harbor.sheldan.dev/oneplus-bot
|
repository: harbor.sheldan.dev/oneplus-bot
|
||||||
|
|||||||
11
tilt/oneplusbot-dev/Chart.yaml
Normal file
11
tilt/oneplusbot-dev/Chart.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
description: oneplusbot dev chart
|
||||||
|
name: oneplusbot-dev
|
||||||
|
version: 1.0.0
|
||||||
|
dependencies:
|
||||||
|
- name: oneplus-bot
|
||||||
|
repository: file://../../deployment/helm/oneplus-bot
|
||||||
|
version: ">= 0.0.1"
|
||||||
|
- name: postgresql
|
||||||
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
|
version: 12.12.10 # 13.x.x uses postgresql 16.x
|
||||||
Reference in New Issue
Block a user