Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add neo-scan-sync to CLI #118

Merged
merged 14 commits into from
Mar 6, 2019
36 changes: 36 additions & 0 deletions cli/stack/neo-scan-sync.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package stack

import (
"github.com/docker/docker/api/types/container"
"github.com/docker/go-connections/nat"
)

// NewNeoScanSync creates a new service for the egistry.gitlab.com/cityofzion/neo-scan/sync:latest image.
nunojusto marked this conversation as resolved.
Show resolved Hide resolved
func NewNeoScanSync() Service {
return Service{
Author: "cityofzion",
ContainerConfig: &container.Config{
Env: []string{
"NEOSCAN=neo-scan-api:4000",
"NEO_NOTIFICATIONS_SERVER='http://notifications-server:8080/v1'",
"NEO_SEEDS='http://neo-privatenet:30333;http://neo-privatenet:30334;http://neo-privatenet:30335;http://neo-privatenet:30336'",
"DB_HOSTNAME=postgres",
"DB_USERNAME=postgres",
nunojusto marked this conversation as resolved.
Show resolved Hide resolved
"DB_PASSWORD=postgres",
"DB_DATABASE=neoscan_prodv",
"REPLACE_OS_VARS=true",
},
ExposedPorts: map[nat.Port]struct{}{
"4002/tcp": {},
},
},
DependsOn: []string{"postgres", "neo-privatenet", "notifications-server"},
nunojusto marked this conversation as resolved.
Show resolved Hide resolved
HostConfig: &container.HostConfig{
Links: []string{"neo-privatenet:30333", "neo-privatenet:30334", "neo-privatenet:30335", "neo-privatenet:30336"},
nunojusto marked this conversation as resolved.
Show resolved Hide resolved
Privileged: false,
},
Image: "registry.gitlab.com/cityofzion/neo-scan/sync",
Name: "neo-scan-sync",
Tag: "latest",
}
}
1 change: 1 addition & 0 deletions cli/stack/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package stack
func Services() []Service {
return []Service{
NewFaucet(),
NewNeoScanSync(),
NewPostgres(),
NewPrivateNet(),
}
Expand Down