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
[WIP] Docker containers for a DAO seednode #3095
Changes from 8 commits
f56d5cb
c802f14
eaa4e72
1f3a4b9
b9aa202
c64ce01
6201679
faf7ff0
00658ef
4c1a280
bffb1fa
ab2ed5b
a3a35c3
ed26990
1365de9
0c032b6
7c1b957
d80bd37
2460830
44bdb02
6189651
e5b79ac
6bbb19c
ca01a7a
4ce6418
ad3e351
e7763f8
1fec30f
0918042
5c08ada
96d4a6d
ea16ded
4b03764
65807f0
916e69b
f984f11
19a7f91
5365ac8
4e189b5
1392be3
6dc7868
5e2415b
32432f5
53cd768
2968a3f
f076f27
b35adb9
4a94b52
f52a234
274149a
765b8b0
b9a38ce
81bf68d
9a831a2
b047a96
065f0c6
4ace3f0
2baea32
5c49de0
85bc99f
c8287db
30e2d72
3448994
6064f29
47965eb
d76662d
d23408f
f5fcabb
5696b68
ed34f0b
c635429
5364709
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
FROM openjdk:11 | ||
ENV APP_NAME=seednode | ||
ENV NODE_PORT=8000 | ||
# first the builder builds the executables | ||
FROM gradle:jdk11 as builder | ||
ARG SEEDNODE_URL | ||
ARG SEEDNODE_BRANCH | ||
RUN git clone $SEEDNODE_URL | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is already in the same repository as the seednode code, we can use local data instead of fetching it from github |
||
WORKDIR /home/gradle/bisq/seednode | ||
RUN git checkout $SEEDNODE_BRANCH | ||
RUN gradle build | ||
RUN chmod +x ./build/app/bin/bisq-seednode | ||
|
||
# then the actual image is created, without gradle, using just the artifacts from the builder | ||
FROM openjdk:10 | ||
EXPOSE 8000 | ||
EXPOSE 5120 | ||
COPY --from=builder /home/gradle/bisq /home/bisq | ||
WORKDIR /home/bisq/seednode | ||
COPY ./build/ ./build/ | ||
COPY ./docker/*.sh ./docker/ | ||
CMD ./docker/wait-for-it.sh 172.28.1.4:8332 --timeout=180 --strict -- nohup sh ./docker/startSeedNode.sh | ||
#CMD sleep 100000 | ||
CMD ./docker/startSeedNode.sh | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM ubuntu:bionic | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
collectd-core \ | ||
openjdk-11-jre | ||
COPY collectd.conf /etc/collectd/collectd.conf | ||
COPY openjdk.conf /etc/ld.so.conf.d/openjdk.conf | ||
RUN ldconfig | ||
CMD /bin/bash -c "/usr/sbin/collectd && trap : TERM INT; sleep infinity & wait" | ||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,145 @@ | ||||
Hostname "3ck4nimvkavyrgd5.onion" | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
Interval 30 | ||||
|
||||
LoadPlugin syslog | ||||
<Plugin syslog> | ||||
LogLevel info | ||||
</Plugin> | ||||
|
||||
LoadPlugin logfile | ||||
LoadPlugin cpu | ||||
LoadPlugin df | ||||
LoadPlugin disk | ||||
LoadPlugin fhcount | ||||
LoadPlugin interface | ||||
LoadPlugin java | ||||
LoadPlugin load | ||||
LoadPlugin memory | ||||
LoadPlugin processes | ||||
LoadPlugin swap | ||||
LoadPlugin write_graphite | ||||
|
||||
# for debugging purposes | ||||
<Plugin logfile> | ||||
LogLevel info | ||||
File "/var/log/collectd.log" | ||||
Timestamp true | ||||
PrintSeverity true | ||||
</Plugin> | ||||
|
||||
<Plugin cpu> | ||||
ReportByCpu true | ||||
ValuesPercentage true | ||||
</Plugin> | ||||
|
||||
<Plugin df> | ||||
MountPoint "/" | ||||
</Plugin> | ||||
|
||||
<Plugin disk> | ||||
Disk "/sd[ab]/" | ||||
</Plugin> | ||||
|
||||
<Plugin fhcount> | ||||
ValuesAbsolute false | ||||
ValuesPercentage true | ||||
</Plugin> | ||||
|
||||
<Plugin interface> | ||||
Interface "eth0" | ||||
</Plugin> | ||||
|
||||
<Plugin java> | ||||
JVMArg "-verbose:jni" | ||||
JVMArg "-Djava.class.path=/usr/share/collectd/java/collectd-api.jar:/usr/share/collectd/java/generic-jmx.jar" | ||||
|
||||
LoadPlugin "org.collectd.java.GenericJMX" | ||||
<Plugin "GenericJMX"> | ||||
# Generic heap/nonheap memory usage. | ||||
<MBean "memory"> | ||||
ObjectName "java.lang:type=Memory" | ||||
#InstanceFrom "" | ||||
InstancePrefix "memory" | ||||
|
||||
# Creates four values: committed, init, max, used | ||||
<Value> | ||||
Type "memory" | ||||
#InstancePrefix "" | ||||
#InstanceFrom "" | ||||
Table true | ||||
Attribute "HeapMemoryUsage" | ||||
InstancePrefix "heap-" | ||||
</Value> | ||||
|
||||
# Creates four values: committed, init, max, used | ||||
<Value> | ||||
Type "memory" | ||||
#InstancePrefix "" | ||||
#InstanceFrom "" | ||||
Table true | ||||
Attribute "NonHeapMemoryUsage" | ||||
InstancePrefix "nonheap-" | ||||
</Value> | ||||
</MBean> | ||||
|
||||
# Memory usage by memory pool. | ||||
<MBean "memory_pool"> | ||||
ObjectName "java.lang:type=MemoryPool,*" | ||||
InstancePrefix "memory_pool-" | ||||
InstanceFrom "name" | ||||
|
||||
<Value> | ||||
Type "memory" | ||||
#InstancePrefix "" | ||||
#InstanceFrom "" | ||||
Table true | ||||
Attribute "Usage" | ||||
</Value> | ||||
</MBean> | ||||
|
||||
<Connection> | ||||
ServiceURL "service:jmx:rmi:///jndi/rmi://172.28.1.3:6969/jmxrmi" | ||||
Collect "memory_pool" | ||||
Collect "memory" | ||||
</Connection> | ||||
|
||||
# See /usr/share/doc/collectd/examples/GenericJMX.conf | ||||
# for an example config. | ||||
</Plugin> | ||||
</Plugin> | ||||
|
||||
#<Plugin load> | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't comment out lines, remove them |
||||
# ReportRelative true | ||||
#</Plugin> | ||||
|
||||
#<Plugin memory> | ||||
# ValuesAbsolute true | ||||
# ValuesPercentage false | ||||
#</Plugin> | ||||
|
||||
#<Plugin processes> | ||||
# Process "name" | ||||
# ProcessMatch "foobar" "/usr/bin/perl foobar\\.pl.*" | ||||
#</Plugin> | ||||
|
||||
#<Plugin swap> | ||||
# ReportByDevice false | ||||
# ReportBytes true | ||||
#</Plugin> | ||||
|
||||
<Plugin write_graphite> | ||||
<Node "node"> | ||||
Host "172.28.1.5" | ||||
Port "2003" | ||||
Protocol "tcp" | ||||
ReconnectInterval 0 | ||||
LogSendErrors false | ||||
Prefix "servers." | ||||
StoreRates true | ||||
AlwaysAppendDS false | ||||
EscapeCharacter "_" | ||||
SeparateInstances false | ||||
PreserveSeparator false | ||||
DropDuplicateFields false | ||||
</Node> | ||||
</Plugin> |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,50 @@ | ||||||
user www-data; | ||||||
worker_processes auto; | ||||||
pid /run/nginx.pid; | ||||||
include /etc/nginx/modules-enabled/*.conf; | ||||||
|
||||||
events { | ||||||
worker_connections 768; | ||||||
# multi_accept on; | ||||||
} | ||||||
|
||||||
http { | ||||||
sendfile on; | ||||||
tcp_nopush on; | ||||||
tcp_nodelay on; | ||||||
keepalive_timeout 65; | ||||||
types_hash_max_size 2048; | ||||||
|
||||||
include /etc/nginx/mime.types; | ||||||
default_type application/octet-stream; | ||||||
|
||||||
access_log /var/log/nginx/access.log; | ||||||
error_log /var/log/nginx/error.log; | ||||||
|
||||||
gzip off; | ||||||
|
||||||
include /etc/nginx/conf.d/*.conf; | ||||||
include /etc/nginx/sites-enabled/*; | ||||||
} | ||||||
|
||||||
stream { | ||||||
log_format basic '$remote_addr [$time_local] ' | ||||||
'$protocol Status $status Sent $bytes_sent Received $bytes_received ' | ||||||
'Time $session_time'; | ||||||
|
||||||
error_log syslog:server=unix:/dev/log; | ||||||
access_log syslog:server=unix:/dev/log basic; | ||||||
|
||||||
server { | ||||||
listen 2003; | ||||||
allow 172.28.1.4; | ||||||
deny all; | ||||||
Comment on lines
+37
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
proxy_pass monitor.bisq.network:2002; | ||||||
proxy_ssl on; | ||||||
|
||||||
proxy_ssl_certificate /etc/nginx/cert.crt; | ||||||
proxy_ssl_certificate_key /etc/nginx/cert.key; | ||||||
|
||||||
proxy_ssl_session_reuse on; | ||||||
} | ||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/usr/lib/jvm/java-11-openjdk-amd64/lib/server | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this used for? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the nginx container necessary?