Skip to content

Commit 842e4a1

Browse files
committed
Add Dockerfile
0 parents  commit 842e4a1

File tree

10 files changed

+655
-0
lines changed

10 files changed

+655
-0
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
NODE_VERSION=10.1.3
2+
POSTGRES_VERSION=15.0
3+
DBSYNC_VERSION=13.6.0.4

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM ubuntu:24.04 as config
2+
RUN apt-get update && apt-get install -y git \
3+
&& git clone --depth 1 --filter=blob:none --sparse --no-checkout https://github.com/IntersectMBO/cardano-world.git \
4+
&& cd cardano-world \
5+
&& git sparse-checkout set docs/environments \
6+
&& git checkout
7+
8+
FROM ghcr.io/intersectmbo/cardano-db-sync:13.6.0.4
9+
COPY --from=config /cardano-world/docs/environments /environments
10+
COPY ./entrypoint.sh ./update_json_keys.sh /
11+
ENTRYPOINT ["/bin/sh" "-e" "/entrypoint.sh" ]

dbsync-config.json

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
{
2+
"EnableFutureGenesis": true,
3+
"EnableLogMetrics": false,
4+
"EnableLogging": true,
5+
"NetworkName": "mainnet",
6+
"NodeConfigFile": "/nix/store/kcl7gc0q0w70c51lnfh1cdk70niylshd-config-mainnet.json",
7+
"PrometheusPort": 8080,
8+
"RequiresNetworkMagic": "RequiresNoMagic",
9+
"defaultBackends": [
10+
"KatipBK"
11+
],
12+
"defaultScribes": [
13+
[
14+
"StdoutSK",
15+
"stdout"
16+
]
17+
],
18+
"insert_options": {
19+
"preset": "full",
20+
"tx_cbor": "enable"
21+
},
22+
"minSeverity": "Info",
23+
"options": {
24+
"cfokey": {
25+
"value": "Release-1.0.0"
26+
},
27+
"mapBackends": {},
28+
"mapSeverity": {
29+
"db-sync-node": "Info",
30+
"db-sync-node.Mux": "Error",
31+
"db-sync-node.Subscription": "Error"
32+
},
33+
"mapSubtrace": {
34+
"#ekgview": {
35+
"contents": [
36+
[
37+
{
38+
"contents": "cardano.epoch-validation.benchmark",
39+
"tag": "Contains"
40+
},
41+
[
42+
{
43+
"contents": ".monoclock.basic.",
44+
"tag": "Contains"
45+
}
46+
]
47+
],
48+
[
49+
{
50+
"contents": "cardano.epoch-validation.benchmark",
51+
"tag": "Contains"
52+
},
53+
[
54+
{
55+
"contents": "diff.RTS.cpuNs.timed.",
56+
"tag": "Contains"
57+
}
58+
]
59+
],
60+
[
61+
{
62+
"contents": "#ekgview.#aggregation.cardano.epoch-validation.benchmark",
63+
"tag": "StartsWith"
64+
},
65+
[
66+
{
67+
"contents": "diff.RTS.gcNum.timed.",
68+
"tag": "Contains"
69+
}
70+
]
71+
]
72+
],
73+
"subtrace": "FilterTrace"
74+
},
75+
"#messagecounters.aggregation": {
76+
"subtrace": "NoTrace"
77+
},
78+
"#messagecounters.ekgview": {
79+
"subtrace": "NoTrace"
80+
},
81+
"#messagecounters.katip": {
82+
"subtrace": "NoTrace"
83+
},
84+
"#messagecounters.monitoring": {
85+
"subtrace": "NoTrace"
86+
},
87+
"#messagecounters.switchboard": {
88+
"subtrace": "NoTrace"
89+
},
90+
"benchmark": {
91+
"contents": [
92+
"GhcRtsStats",
93+
"MonotonicClock"
94+
],
95+
"subtrace": "ObservableTrace"
96+
},
97+
"cardano.epoch-validation.utxo-stats": {
98+
"subtrace": "NoTrace"
99+
}
100+
}
101+
},
102+
"rotation": {
103+
"rpKeepFilesNum": 10,
104+
"rpLogLimitBytes": 5000000,
105+
"rpMaxAgeHours": 24
106+
},
107+
"setupBackends": [
108+
"AggregationBK",
109+
"KatipBK"
110+
],
111+
"setupScribes": [
112+
{
113+
"scFormat": "ScText",
114+
"scKind": "StdoutSK",
115+
"scName": "stdout",
116+
"scRotation": null
117+
}
118+
]
119+
}

docker-compose-rendered.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
configs:
2+
dbsync_config.json:
3+
file: ./dbsync-config.json
4+
networks:
5+
dbsync:
6+
external: true
7+
name: dbsync
8+
secrets:
9+
dbsync_db_root_password:
10+
external: true
11+
name: dbsync_db_root_password
12+
dbsync_mainnet_db:
13+
external: true
14+
name: dbsync_mainnet_db
15+
dbsync_preprod_db:
16+
external: true
17+
name: dbsync_preprod_db
18+
dbsync_preview_db:
19+
external: true
20+
dbsync_sanchonet_db:
21+
external: true
22+
postgres_password:
23+
external: true
24+
name: dbsync_db_user_password
25+
postgres_user:
26+
external: true
27+
name: dbsync_db_user
28+
services:
29+
preview2:
30+
configs:
31+
- source: dbsync_config.json
32+
target: /run/configs/dbsync2_config.json
33+
deploy:
34+
labels:
35+
co_elastic_logs/enable: 'false'
36+
placement:
37+
constraints:
38+
- node.labels.dbsync2 == true
39+
restart_policy:
40+
condition: on-failure
41+
delay: 15s
42+
environment:
43+
DB_SYNC_CONFIG: /run/configs/dbsync2_config.json
44+
DISABLE_CACHE: ''
45+
DISABLE_EPOCH: ''
46+
DISABLE_LEDGER: ''
47+
NETWORK: preview
48+
POSTGRES_HOST: postgres2
49+
POSTGRES_PORT: 5432
50+
image: ghcr.io/intersectmbo/cardano-db-sync:13.6.0.4
51+
logging:
52+
driver: json-file
53+
options:
54+
max-file: '10'
55+
max-size: 10m
56+
secrets:
57+
- postgres_user
58+
- source: dbsync_preview_db
59+
target: postgres_db
60+
- postgres_password
61+
volumes:
62+
- /srv/cardano/cardano_preview-dbsync/_data/:/var/lib/cexplorer
63+
- cardano_preview-ipc:/node-ipc
64+
version: '3.9'
65+
volumes:
66+
cardano_mainnet-ipc:
67+
external: true
68+
cardano_preprod-ipc:
69+
external: true
70+
cardano_preview-ipc:
71+
external: true
72+
cardano_sanchonet-ipc:
73+
external: true
74+
postgres:
75+
external: true
76+
name: dbsync_postgres

docker-compose-rendered.yml.json

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
{
2+
"version": "3.9",
3+
"volumes": {
4+
"cardano_mainnet-ipc": {
5+
"external": true
6+
},
7+
"cardano_preprod-ipc": {
8+
"external": true
9+
},
10+
"cardano_preview-ipc": {
11+
"external": true
12+
},
13+
"cardano_sanchonet-ipc": {
14+
"external": true
15+
},
16+
"postgres": {
17+
"external": true,
18+
"name": "dbsync_postgres"
19+
}
20+
},
21+
"networks": {
22+
"dbsync": {
23+
"name": "dbsync",
24+
"external": true
25+
}
26+
},
27+
"secrets": {
28+
"dbsync_db_root_password": {
29+
"external": true,
30+
"name": "dbsync_db_root_password"
31+
},
32+
"postgres_password": {
33+
"external": true,
34+
"name": "dbsync_db_user_password"
35+
},
36+
"postgres_user": {
37+
"external": true,
38+
"name": "dbsync_db_user"
39+
},
40+
"dbsync_mainnet_db": {
41+
"external": true,
42+
"name": "dbsync_mainnet_db"
43+
},
44+
"dbsync_preprod_db": {
45+
"external": true,
46+
"name": "dbsync_preprod_db"
47+
},
48+
"dbsync_preview_db": {
49+
"external": true
50+
},
51+
"dbsync_sanchonet_db": {
52+
"external": true
53+
}
54+
},
55+
"configs": {
56+
"dbsync_config.json": {
57+
"file": "./dbsync-config.json"
58+
}
59+
},
60+
"services": {
61+
"preview2": {
62+
"image": "ghcr.io/intersectmbo/cardano-db-sync:13.6.0.4",
63+
"environment": {
64+
"NETWORK": "preview",
65+
"POSTGRES_HOST": "postgres2",
66+
"POSTGRES_PORT": 5432,
67+
"DB_SYNC_CONFIG": "/run/configs/dbsync2_config.json",
68+
"DISABLE_CACHE": "",
69+
"DISABLE_LEDGER": "",
70+
"DISABLE_EPOCH": ""
71+
},
72+
"secrets": [
73+
"postgres_user",
74+
{
75+
"source": "dbsync_preview_db",
76+
"target": "postgres_db"
77+
},
78+
"postgres_password"
79+
],
80+
"configs": [
81+
{
82+
"source": "dbsync_config.json",
83+
"target": "/run/configs/dbsync2_config.json"
84+
}
85+
],
86+
"volumes": [
87+
"/srv/cardano/cardano_preview-dbsync/_data/:/var/lib/cexplorer",
88+
"cardano_preview-ipc:/node-ipc"
89+
],
90+
"logging": {
91+
"driver": "json-file",
92+
"options": {
93+
"max-size": "10m",
94+
"max-file": "10"
95+
}
96+
},
97+
"deploy": {
98+
"labels": {
99+
"co_elastic_logs/enable": "false"
100+
},
101+
"placement": {
102+
"constraints": [
103+
"node.labels.dbsync2 == true"
104+
]
105+
},
106+
"restart_policy": {
107+
"condition": "on-failure",
108+
"delay": "15s"
109+
}
110+
}
111+
}
112+
}
113+
}

0 commit comments

Comments
 (0)