Skip to content

Commit 66d5af6

Browse files
authored
Merge pull request #20 from interfacerproject/add_interfacer-dpp
feat: add interfacer-dpp service
2 parents aa2b3a5 + 1b5da9c commit 66d5af6

3 files changed

Lines changed: 43 additions & 6 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ which will name the image "interfacer-gateway". Then, you can run:
8585

8686
docker run --rm -p PORT:8080 \
8787
-e ZENFLOWS_URL=http://url-to-zenflows-instance \
88+
-e INTERFACER_DPP_URL=http://url-to-interfacer-dpp-instance \
8889
-e INBOX_URL=http://url-to-inbox-instance \
8990
-e WALLET_URL=http://url-to-wallet-instance \
9091
-e OSH_URL=http://url-to-osh-instance \
@@ -105,6 +106,7 @@ To use that image, you can run:
105106

106107
docker run --rm -p PORT:8080 \
107108
-e ZENFLOWS_URL=http://url-to-zenflows-instance \
109+
-e INTERFACER_DPP_URL=http://url-to-interfacer-dpp-instance \
108110
-e INBOX_URL=http://url-to-inbox-instance \
109111
-e WALLET_URL=http://url-to-wallet-instance \
110112
-e OSH_URL=http://url-to-osh-instance \
@@ -129,6 +131,7 @@ services:
129131
- 3000:8080
130132
environment:
131133
ZENFLOWS_URL: http://url-to-zenflows-instance
134+
INTERFACER_DPP_URL: http://url-to-interfacer-dpp-instance
132135
INBOX_URL: http://url-to-inbox-instance
133136
WALLET_URL: http://url-to-wallet-instance
134137
OSH_URL: http://url-to-osh-instance
@@ -169,6 +172,9 @@ Here is the list of them:
169172
* `ZENFLOWS_URL` - the URL of
170173
[the zenflows instance](https://github.com/interfacerproject/zenflows)
171174
to which the requests will be proxied;
175+
* `INTERFACER_DPP_URL` - the URL of
176+
[the interfacer-dpp instance](https://github.com/interfacerproject/interfacer-dpp)
177+
to which the requests will be proxied;
172178
* `INBOX_URL` - the URL of
173179
[the zenflows-inbox instance](https://github.com/interfacerproject/zenflows-inbox)
174180
to which the requests should be proxied;

config/config.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ type Config struct {
4545
// https://github.com/interfacerproject/zenflows-wallet
4646
WalletURL *url.URL
4747

48+
// InterfacerDPPURL is the URL of the interfacer-dpp instance to
49+
// which we proxy request. More on that at the project page:
50+
// https://github.com/interfacerproject/interfacer-dpp
51+
InterfacerDPPURL *url.URL
52+
4853
// OSHURL is the URL of the zenflows-osh instance to which
4954
// we proxy request. More on that at the project page:
5055
// https://github.com/interfacerproject/zenflows-osh
@@ -89,6 +94,12 @@ func NewEnv() (*Config, error) {
8994
}
9095
c.WalletURL = u
9196

97+
u, err = fetchURL("INTERFACER_DPP_URL")
98+
if err != nil {
99+
return nil, err
100+
}
101+
c.InterfacerDPPURL = u
102+
92103
u, err = fetchURL("OSH_URL")
93104
if err != nil {
94105
return nil, err

devops/roles/proxy-docker-compose/templates/docker-compose.yml.j2

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ services:
2727
ADDR: :80
2828
INBOX_URL: "http://inbox"
2929
WALLET_URL: "http://wallet"
30+
INTERFACER_DPP_URL: "http://interfacer-dpp"
3031
OSH_URL: "http://osh/"
3132
IFACER_LOG: "/log"
3233
extra_hosts:
@@ -76,13 +77,32 @@ services:
7677
- wallet_data:/var/lib/tarantool
7778
extra_hosts:
7879
- "gateway0.interfacer.dyne.org:10.202.41.10"
79-
osh:
80-
image: "ghcr.io/interfacerproject/zenflows-osh:master"
81-
restart: always
80+
mongodb:
81+
image: mongo:latest
82+
container_name: dpp-mongodb
83+
ports:
84+
- "27017:27017"
85+
volumes:
86+
- mongodb_data:/data/db
87+
networks:
88+
- dpp-network
89+
90+
interfacer-dpp:
91+
image: ghcr.io/interfacerproject/interfacer-dpp:main
92+
container_name: interfacer-dpp
93+
ports:
94+
- "8080:8080"
8295
environment:
83-
ADDR: ":80"
84-
extra_hosts:
85-
- "gateway0.interfacer.dyne.org:10.202.41.10"
96+
- MONGODB_URI=mongodb://mongodb:27017
97+
depends_on:
98+
- mongodb
99+
networks:
100+
- dpp-network
86101
volumes:
87102
wallet_data:
88103
inbox_data:
104+
mongodb_data:
105+
106+
networks:
107+
dpp-network:
108+
driver: bridge

0 commit comments

Comments
 (0)