Skip to content

Commit 1826dbe

Browse files
committed
fix: resolve prettier formatting conflict
1 parent e1af45e commit 1826dbe

21 files changed

Lines changed: 242 additions & 379 deletions

config/be/datasource.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"name": "mongo",
3-
"connector": "mongodb",
4-
"host": "mongodb",
5-
"port": 27017,
6-
"user": "",
7-
"password": "",
8-
"database": "scilog",
9-
"useNewUrlParser": true,
10-
"useUnifiedTopology": true,
11-
"allowExtendedOperators": true
2+
"name": "mongo",
3+
"connector": "mongodb",
4+
"host": "mongodb",
5+
"port": 27017,
6+
"user": "",
7+
"password": "",
8+
"database": "scilog",
9+
"useNewUrlParser": true,
10+
"useUnifiedTopology": true,
11+
"allowExtendedOperators": true
1212
}

config/be/functionalAccounts.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
"lastName": "Scilog",
66
"password": "scilog@scilog",
77
"email": "scilog@scilog",
8-
"roles": [
9-
"admin",
10-
"any-authenticated-user"
11-
]
8+
"roles": ["admin", "any-authenticated-user"]
129
}
13-
]
10+
]

config/be/oidc.example.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"session": false,
3-
"provider": "oidc",
4-
"authScheme": "openid connect",
5-
"module": "passport-openidconnect",
6-
"failureFlash": true,
7-
"issuer": "YOURKC/YOURREALM",
8-
"authorizationURL": "YOURKC/YOURREALM/protocol/openid-connect/auth",
9-
"tokenURL": "YOURKC/YOURREALM/openid-connect/token",
10-
"userInfoURL": "YOURKC/YOURREALM/openid-connect/userinfo",
11-
"clientID": "YOURCLIENT",
12-
"clientSecret": "YOURSECRET",
13-
"callbackURL": "http://localhost:3000/auth/keycloak/callback",
14-
"scope": ["email", "profile", "openid"],
15-
"successRedirect": "http://localhost:4200/login",
16-
"skipUserProfile": false
2+
"session": false,
3+
"provider": "oidc",
4+
"authScheme": "openid connect",
5+
"module": "passport-openidconnect",
6+
"failureFlash": true,
7+
"issuer": "YOURKC/YOURREALM",
8+
"authorizationURL": "YOURKC/YOURREALM/protocol/openid-connect/auth",
9+
"tokenURL": "YOURKC/YOURREALM/openid-connect/token",
10+
"userInfoURL": "YOURKC/YOURREALM/openid-connect/userinfo",
11+
"clientID": "YOURCLIENT",
12+
"clientSecret": "YOURSECRET",
13+
"callbackURL": "http://localhost:3000/auth/keycloak/callback",
14+
"scope": ["email", "profile", "openid"],
15+
"successRedirect": "http://localhost:4200/login",
16+
"skipUserProfile": false
1717
}

config/be/roles.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ function roles(profile) {
22
return (profile._json?.roles ?? []).reduce(
33
(previousValue, currentValue) =>
44
/^e[0-9]{5}$/.test(currentValue)
5-
? previousValue.concat([currentValue, 'p' + currentValue.substring(1)])
5+
? previousValue.concat([currentValue, "p" + currentValue.substring(1)])
66
: previousValue.concat([currentValue]),
77
[],
88
);
99
}
10-
exports.roles = roles
10+
exports.roles = roles;

config/docker-compose.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
services:
22
reverse-proxy:
3-
image: traefik:3.2
3+
image: traefik:3.6
44
command: --api.insecure=true --providers.docker=true --entrypoints.web.address=:80
55
ports:
66
- 80:80
77
volumes:
88
- /var/run/docker.sock:/var/run/docker.sock
9-
9+
user: root
1010
mongodb:
1111
image: mongo:4.2
1212
volumes:
1313
- mongodb_data:/data/db
1414
- ./mongo/rs-init.sh:/rs-init.sh:ro
15-
command: [ "--replSet", "rs0", "--bind_ip_all" ]
15+
command: ["--replSet", "rs0", "--bind_ip_all"]
1616
healthcheck:
1717
test: ./rs-init.sh
1818
interval: 5s
@@ -38,14 +38,13 @@ services:
3838
- be
3939

4040
backend:
41-
image: ghcr.io/paulscherrerinstitute/scilog/be
41+
build: ../sci-log-db # 👈 THIS is the correct path
42+
image: local-scilog-be:latest
4243
depends_on:
4344
mongodb:
4445
condition: service_healthy
4546
volumes:
46-
# uncomment and edit the ./be/oidc.json to enable oidc
47-
# for keycloak get your config values from: YOURKC_URL/realms/YOUR_REALM/.well-known/openid-configuration or YOURKC_URL/auth/realms/YOUR_REALM/.well-known/openid-configuration for older keycloak versions
48-
# - ./be/oidc.json:/home/node/app/oidc.json
47+
- ../sci-log-db:/home/node/app # 👈 live sync
4948
- ./be/datasource.json:/home/node/app/datasource.json
5049
- ./be/functionalAccounts.json:/home/node/app/functionalAccounts.json
5150
environment:
@@ -57,13 +56,14 @@ services:
5756
- be
5857
labels:
5958
- traefik.http.routers.backend.rule=PathPrefix(`/api/v1`)
59+
- traefik.http.services.backend.loadbalancer.server.port=3000
6060

6161
frontend:
62-
image: ghcr.io/paulscherrerinstitute/scilog/fe
62+
image: local/scilog-fe:latest
6363
volumes:
64-
# replace simple_config.json volume mount
65-
# with the one below to enable the oidc form
66-
# - ./fe/config.json:/usr/share/nginx/html/assets/config.json
64+
# replace simple_config.json volume mount
65+
# with the one below to enable the oidc form
66+
# - ./fe/config.json:/usr/share/nginx/html/assets/config.json
6767
- ./fe/simple_config.json:/usr/share/nginx/html/assets/config.json
6868
profiles:
6969
- fe

config/fe/config.dev.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"lbBaseURL": "http://localhost:3000/api/v1/",
3-
"oAuth2Endpoint": {
4-
"authURL": "auth/keycloak",
5-
"displayText": "keycloak"
6-
}
2+
"lbBaseURL": "http://localhost:3000/api/v1/",
3+
"oAuth2Endpoint": {
4+
"authURL": "auth/keycloak",
5+
"displayText": "keycloak"
6+
}
77
}

config/fe/config.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"lbBaseURL": "http://localhost/api/v1/",
3-
"oAuth2Endpoint": {
4-
"authURL": "auth/keycloak",
5-
"displayText": "keycloak"
6-
}
2+
"lbBaseURL": "http://localhost/api/v1/",
3+
"oAuth2Endpoint": {
4+
"authURL": "auth/keycloak",
5+
"displayText": "keycloak"
6+
}
77
}

config/fe/simple_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"lbBaseURL": "http://localhost/api/v1/"
2+
"lbBaseURL": "http://localhost/api/v1/"
33
}
Lines changed: 29 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,31 @@
11
[
2-
{
3-
"snippetType": "location",
4-
"createdBy": "scilog@scilog",
5-
"updatedBy": "scilog@scilog",
6-
"readACL": [
7-
"any-authenticated-user"
8-
],
9-
"deleteACL": [
10-
"admin"
11-
],
12-
"adminACL": [
13-
"admin"
14-
],
15-
"name": "root",
16-
"location": "root",
17-
"_id": {
18-
"$oid": "64e898e65b05b2003e22c2e4"
19-
}
20-
},
21-
{
22-
"snippetType": "location",
23-
"createdBy": "scilog@scilog",
24-
"updatedBy": "scilog@scilog",
25-
"readACL": [
26-
"any-authenticated-user"
27-
],
28-
"deleteACL": [
29-
"admin"
30-
],
31-
"adminACL": [
32-
"admin"
33-
],
34-
"parentId": {
35-
"$oid": "64e898e65b05b2003e22c2e4"
36-
},
37-
"name": "test",
38-
"location": "test",
39-
"_id": {
40-
"$oid": "64e898e65b05b2003e22c2e5"
41-
}
42-
}
2+
{
3+
"snippetType": "location",
4+
"createdBy": "scilog@scilog",
5+
"updatedBy": "scilog@scilog",
6+
"readACL": ["any-authenticated-user"],
7+
"deleteACL": ["admin"],
8+
"adminACL": ["admin"],
9+
"name": "root",
10+
"location": "root",
11+
"_id": {
12+
"$oid": "64e898e65b05b2003e22c2e4"
13+
}
14+
},
15+
{
16+
"snippetType": "location",
17+
"createdBy": "scilog@scilog",
18+
"updatedBy": "scilog@scilog",
19+
"readACL": ["any-authenticated-user"],
20+
"deleteACL": ["admin"],
21+
"adminACL": ["admin"],
22+
"parentId": {
23+
"$oid": "64e898e65b05b2003e22c2e4"
24+
},
25+
"name": "test",
26+
"location": "test",
27+
"_id": {
28+
"$oid": "64e898e65b05b2003e22c2e5"
29+
}
30+
}
4331
]

sci-log-db/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ COPY --chown=node package*.json ./
2020

2121
RUN npm cache clean --force
2222

23-
RUN npm install
23+
RUN npm install --include=dev
2424

2525
# Bundle app source code
2626
COPY --chown=node . .

0 commit comments

Comments
 (0)