Skip to content

Commit 6ad1dce

Browse files
committed
harmonize directory usage
1 parent e3fca93 commit 6ad1dce

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,16 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
1414
apt-get install --no-install-recommends -y \
1515
libgoogle-perftools4 \
1616
wget && \
17-
useradd -m -r -u $UID -d /home/dockeruser dockeruser && \
17+
useradd -m -r -u $UID -d /opt/graphsense dockeruser && \
1818
mkdir -p /opt/graphsense/data && \
19-
chown -R dockeruser /opt/graphsense
20-
RUN wget https://github.com/tronprotocol/java-tron/releases/download/GreatVoyage-v4.7.3/FullNode.jar -O /home/dockeruser/FullNode.jar && \
21-
chown dockeruser:dockeruser /home/dockeruser/FullNode.jar
19+
chown -R dockeruser /opt/graphsenseq
2220

2321
USER dockeruser
22+
RUN wget https://github.com/tronprotocol/java-tron/releases/download/GreatVoyage-v4.7.3/FullNode.jar -O /opt/graphsense/FullNode.jar
2423
ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4"
2524
ENV TCMALLOC_RELEASE_RATE=10
2625
ADD conf/main_net_config.conf /opt/graphsense/client.conf
2726
ADD logback.xml /opt/graphsense/logback.xml
28-
WORKDIR /home/dockeruser
27+
WORKDIR /opt/graphsense
2928

3029
CMD ["java", "-Xmx24g", "-XX:+UseConcMarkSweepGC", "-jar", "FullNode.jar", "-c", "/opt/graphsense/client.conf", "--output-directory", "/opt/graphsense/data", "--log-config", "/opt/graphsense/logback.xml"]

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Client data is persisted on the host machine using a Docker volume.
1919
In the default setting the local directory `./data` is mapped to
2020
to `/opt/graphsense/data` inside the container.
2121
Logs are stored in the log directory created by the tron client
22-
which resides in `/home/dockeruser/logs` and is by default mapped
22+
which resides in `/opt/graphsense/logs` and is by default mapped
2323
to `./logs/`. To override these settings
2424
a Docker Compose override file can be used, e.g.
2525

@@ -31,10 +31,10 @@ services:
3131
tron-client:
3232
volumes:
3333
- ./data:/opt/graphsense/data
34-
- ./logs:/home/dockeruser/logs
34+
- ./logs:/opt/graphsense/logs
3535
```
3636

37-
The data directory on the host system must be writeable by user `dockeruser`.
37+
The data directory on the host system must be writeable by user `dockeruser`. To provide your own customized java-tron config, just map it at ```/opt/graphsense/client.conf```.
3838

3939
## Usage
4040

docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ services:
1111
dockerfile: ./Dockerfile
1212
volumes:
1313
- ./data/:/opt/graphsense/data:Z
14-
- ./conf/main_net_config.conf:/opt/graphsense/client2.conf:Z
15-
- ./logs/:/home/dockeruser/logs:Z
14+
- ./conf/main_net_config.conf:/opt/graphsense/client.conf:Z
15+
- ./logs/:/opt/graphsense/logs:Z
1616
ports:
1717
- 50545:50545
1818
- 50555:50555

0 commit comments

Comments
 (0)