wip: update passing Queue to Commander
- Add minio to docker-compose
- Fix use of server.NewCommanderSingle
This commit is contained in:
committed by
=Michael Hohn
parent
7e0d6909da
commit
fc29fc5653
11
README.md
11
README.md
@@ -30,7 +30,7 @@ These are simple steps using a single container.
|
||||
cd /mrva/mrvacommander/cmd/server/ && ./server
|
||||
|
||||
## Using docker-compose
|
||||
Steps to build and run the server in a multi-container environment set up by docker-compose.
|
||||
### Steps to build and run the server in a multi-container environment set up by docker-compose.
|
||||
|
||||
1. Build server on host
|
||||
|
||||
@@ -51,11 +51,8 @@ Steps to build and run the server in a multi-container environment set up by doc
|
||||
./server -loglevel=debug -mode=container
|
||||
|
||||
1. Test server via remote client by following the steps in [gh-mrva](https://github.com/hohn/gh-mrva/blob/connection-redirect/README.org#compacted-edit-run-debug-cycle)
|
||||
|
||||
|
||||
|
||||
|
||||
Some general docker-compose commands
|
||||
### Some general docker-compose commands
|
||||
|
||||
2. Get service status
|
||||
|
||||
@@ -76,7 +73,7 @@ Some general docker-compose commands
|
||||
curl -I http://rabbitmq:15672
|
||||
|
||||
|
||||
Some postgres specific commands
|
||||
### Some postgres specific commands
|
||||
|
||||
1. Access PostgreSQL
|
||||
|
||||
@@ -100,7 +97,7 @@ Some postgres specific commands
|
||||
\lo_import FILE [COMMENT]
|
||||
|
||||
|
||||
Manually create needed postgres databases
|
||||
### Manually create needed postgres databases
|
||||
|
||||
# on the host
|
||||
psql -h localhost -p 5432 -U exampleuser -d postgres
|
||||
|
||||
@@ -69,7 +69,7 @@ func main() {
|
||||
case "standalone":
|
||||
// Assemble single-process version
|
||||
sq := queue.NewQueueSingle(2) // FIXME take value from configuration
|
||||
sc := server.NewCommanderSingle(nil, sq)
|
||||
sc := server.NewCommanderSingle()
|
||||
sl := logger.NewLoggerSingle()
|
||||
ss := storage.NewStorageSingle(config.Storage.StartingID)
|
||||
sr := agent.NewRunnerSingle(2, sq) // FIXME take value from configuration
|
||||
@@ -112,7 +112,7 @@ func main() {
|
||||
case "container":
|
||||
// Assemble container version
|
||||
sq := queue.NewQueueSingle(2) // FIXME take value from configuration
|
||||
sc := server.NewCommanderSingle(nil, sq)
|
||||
sc := server.NewCommanderSingle()
|
||||
sl := logger.NewLoggerSingle()
|
||||
|
||||
ss, err := storage.NewStorageContainer(config.Storage.StartingID)
|
||||
|
||||
@@ -47,10 +47,28 @@ services:
|
||||
networks:
|
||||
- backend
|
||||
|
||||
minio:
|
||||
image: minio/minio:RELEASE.2024-06-11T03-13-30Z
|
||||
container_name: minio
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
environment:
|
||||
MINIO_ROOT_USER: user
|
||||
MINIO_ROOT_PASSWORD: musty-coke
|
||||
command: server /data --console-address ":9001"
|
||||
volumes:
|
||||
- minio-data:/data
|
||||
|
||||
volumes:
|
||||
minio-data:
|
||||
postgres_data:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
backend:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
driver: local
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ func (c *CommanderSingle) MirvaRequest(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
not_found_repos, analysisRepos := c.st.ServerStore.FindAvailableDBs(session_repositories)
|
||||
|
||||
c.queue.StartAnalyses(analysisRepos, session_id, session_language)
|
||||
c.st.Queue.StartAnalyses(analysisRepos, session_id, session_language)
|
||||
|
||||
si := SessionInfo{
|
||||
ID: session_id,
|
||||
|
||||
@@ -26,12 +26,10 @@ type SessionInfo struct {
|
||||
|
||||
type CommanderSingle struct {
|
||||
st *CommanderVisibles
|
||||
// TODO remove:
|
||||
queue queue.Queue
|
||||
}
|
||||
|
||||
func NewCommanderSingle(s *CommanderVisibles, q queue.Queue) *CommanderSingle {
|
||||
c := CommanderSingle{s, q}
|
||||
func NewCommanderSingle() *CommanderSingle {
|
||||
c := CommanderSingle{}
|
||||
return &c
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user