Skip to content

Commit 5dd67c1

Browse files
committed
containerfiles: update PCCS image
Changed workspace image to nodejs-20-minimal and added support for environmental values handling via custom-environment-variables.json Signed-off-by: Pawel Proskurnicki <[email protected]>
1 parent bf8335d commit 5dd67c1

File tree

3 files changed

+54
-3
lines changed

3 files changed

+54
-3
lines changed

containerfiles/pccs/Containerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ WORKDIR ../../QuoteGeneration/pccs
1717
RUN npm config set engine-strict true \
1818
&& npm install
1919

20-
FROM registry.access.redhat.com/ubi9/nodejs-20:latest
20+
FROM registry.access.redhat.com/ubi9/nodejs-20-minimal:latest
2121

22-
WORKDIR intel/pccs
23-
COPY --from=builder --chown=default:1001 /opt/app-root/src/SGXDataCenterAttestationPrimitives/QuoteGeneration/pccs .
22+
WORKDIR /opt/intel/pccs
23+
24+
COPY --from=builder --chown=1001:users /opt/app-root/src/SGXDataCenterAttestationPrimitives/QuoteGeneration/pccs .
25+
COPY --chown=1001:users default.json config/
26+
COPY --chown=1001:users custom-environment-variables.json config/
2427

2528
ENTRYPOINT ["/usr/bin/node", "pccs_server.js"]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"HTTPS_PORT": "PCCS_HTTPS_PORT",
3+
"ApiKey": "PCCS_API_KEY",
4+
"proxy": "CLUSTER_HTTPS_PROXY",
5+
"UserTokenHash": "PCCS_USER_TOKEN_HASH",
6+
"AdminTokenHash": "PCCS_ADMIN_TOKEN_HASH",
7+
"CachingFillMode": "PCCS_FILL_MODE",
8+
"LogLevel": "PCCS_LOG_LEVEL",
9+
"sqlite": {
10+
"database": "PCCS_DB_NAME",
11+
"username": "PCCS_DB_USERNAME",
12+
"password": "PCCS_DB_PASSWORD"
13+
}
14+
}

containerfiles/pccs/default.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"HTTPS_PORT": 8042,
3+
"hosts": "0.0.0.0",
4+
"uri": "https://api.trustedservices.intel.com/sgx/certification/v4/",
5+
"ApiKey": "",
6+
"proxy": "",
7+
"RefreshSchedule": "0 0 1 * * *",
8+
"UserTokenHash": "",
9+
"AdminTokenHash": "",
10+
"CachingFillMode": "LAZY",
11+
"OPENSSL_FIPS_MODE": false,
12+
"LogLevel": "info",
13+
"DB_CONFIG": "sqlite",
14+
"sqlite": {
15+
"database" : "database",
16+
"username" : "username",
17+
"password" : "password",
18+
"options": {
19+
"host": "localhost",
20+
"dialect": "sqlite",
21+
"pool": {
22+
"max": 5,
23+
"min": 0,
24+
"acquire": 30000,
25+
"idle": 10000
26+
},
27+
"define": {
28+
"freezeTableName": true
29+
},
30+
"logging": true,
31+
"storage": "/var/cache/pccs/pckcache.db"
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)