Skip to content
This repository has been archived by the owner on Dec 18, 2022. It is now read-only.

Commit

Permalink
Add PostgreSQL
Browse files Browse the repository at this point in the history
  • Loading branch information
murphye committed Aug 27, 2020
1 parent d66f0df commit 119e29a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
23 changes: 22 additions & 1 deletion devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,21 @@ components:
command: ['tail']
args: ['-f', '/dev/null']

- memoryLimit: 512Mi
type: dockerimage
volumes:
- name: postgresql-data
containerPath: /var/lib/postgresql/
image: postgres
alias: postgresql
env:
- value: tradedb
name: POSTGRES_USER
- value: tradedb
name: POSTGRES_PASSWORD
- value: tradedb
name: POSTGRES_DB

commands:
-
name: Package
Expand Down Expand Up @@ -98,4 +113,10 @@ commands:
"port": 5005
}
]
}
}
-
name: psql
actions:
- type: exec
command: psql -d tradedb -U tradedb
component: postgresql
8 changes: 5 additions & 3 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ quarkus.log.category."io.smallrye.reactive.messaging".level=DEBUG
# Quarkus configuration file
# key = value
quarkus.datasource.driver=org.postgresql.Driver
quarkus.datasource.url=jdbc:postgresql://postgresql:5432/tradedb
quarkus.datasource.url=jdbc:postgresql://postgresql.daytrader:5432/tradedb
quarkus.datasource.username=tradedb
quarkus.datasource.password=tradedb
quarkus.hibernate-orm.database.generation=drop-and-create
Expand All @@ -13,8 +13,10 @@ quarkus.hibernate-orm.log.sql=true

mp.messaging.incoming.orders.connector=smallrye-kafka
mp.messaging.incoming.orders.topic=morgan4.inventory.outboxevent
mp.messaging.incoming.orders.bootstrap.servers=morgan4-cluster-kafka-bootstrap:9092
mp.messaging.incoming.orders.bootstrap.servers=morgan4-cluster-kafka-bootstrap.daytrader:9092
mp.messaging.incoming.orders.group.id=trade-order-service
mp.messaging.incoming.orders.key.deserializer=org.apache.kafka.common.serialization.StringDeserializer
mp.messaging.incoming.orders.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
mp.messaging.incoming.orders.max.poll.interval.ms=50000
mp.messaging.incoming.orders.max.poll.interval.ms=50000

%dev.quarkus.datasource.url=jdbc:postgresql://localhost:5432/tradedb

0 comments on commit 119e29a

Please sign in to comment.