Skip to content

Commit b4ed4a5

Browse files
committed
update backend structure
1 parent e1ae3f6 commit b4ed4a5

39 files changed

+430
-413
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
REDIS_URL=redis://localhost:6379/0
1+
REDIS_URI=redis://localhost:6379/0

Dockerfile

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
FROM node:18-bookworm-slim as builder
22

33
ENV TIMEZONE=Europe/Paris \
4-
LANGUAGE=fr_FR.UTF-8 \
5-
LANG=fr_FR.UTF-8 \
6-
TERM=xterm \
7-
DEBIAN_FRONTEND=noninteractive
4+
LANGUAGE=fr_FR.UTF-8 \
5+
LANG=fr_FR.UTF-8 \
6+
TERM=xterm \
7+
DEBIAN_FRONTEND=noninteractive
88

99
WORKDIR /data
1010

@@ -21,10 +21,10 @@ RUN yarn run build
2121
FROM node:18-bookworm-slim as production
2222

2323
ENV TIMEZONE=Europe/Paris \
24-
LANGUAGE=fr_FR.UTF-8 \
25-
LANG=fr_FR.UTF-8 \
26-
TERM=xterm \
27-
DEBIAN_FRONTEND=noninteractive
24+
LANGUAGE=fr_FR.UTF-8 \
25+
LANG=fr_FR.UTF-8 \
26+
TERM=xterm \
27+
DEBIAN_FRONTEND=noninteractive
2828

2929
ARG NODE_ENV=production
3030
ENV NODE_ENV=${NODE_ENV}
@@ -35,19 +35,20 @@ ADD package.json .
3535
ADD *.lock .
3636

3737
RUN apt clean -y \
38-
&& apt update -y \
39-
&& apt upgrade -y \
40-
&& apt install -y locales \
41-
&& export LANGUAGE=${LANGUAGE} \
42-
&& export LANG=${LANG} \
43-
&& export LC_ALL=${LC_ALL} \
44-
&& locale-gen ${LANG} \
45-
&& dpkg-reconfigure --frontend ${DEBIAN_FRONTEND} locales \
46-
&& apt install --no-install-recommends -yq \
47-
git \
48-
jq \
49-
nano \
50-
openssl
38+
&& apt update -y \
39+
&& apt upgrade -y \
40+
&& apt install -y locales \
41+
&& export LANGUAGE=${LANGUAGE} \
42+
&& export LANG=${LANG} \
43+
&& export LC_ALL=${LC_ALL} \
44+
&& locale-gen ${LANG} \
45+
&& dpkg-reconfigure --frontend ${DEBIAN_FRONTEND} locales \
46+
&& apt install --no-install-recommends -yq \
47+
procps \
48+
git \
49+
jq \
50+
nano \
51+
openssl
5152

5253
RUN yarn install \
5354
--prefer-offline \

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ dbs: ## Start databases
5959
--health-timeout=3s \
6060
--health-start-period=5s \
6161
--health-retries=3 \
62-
--health-cmd="mongo --eval \"db.stats().ok\" || exit 1" \
62+
--health-cmd="mongosh --eval \"db.stats().ok\" || exit 1" \
6363
mongo:7.0 --replSet rs0 --wiredTigerCacheSizeGB 1.5 || true
6464
@docker volume create $(BASE_NAME)-redis
6565
@docker run -d --rm \

backends.example/01ad/config.yml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1+
_version: 1
12

23
name: 'AD'
34
description: 'Backend for AD'
4-
active: 0
5+
active: false
56
actions:
6-
CHANGEPWD:
7-
script: "changepasswd"
8-
onError: 'stop'
9-
RESETPWD:
10-
script: "resetpasswd"
11-
onError: 'stop'
12-
IDENTITY_CREATE:
13-
script: 'dummy.sh'
14-
IDENTITY_UPDATE:
15-
script: 'dummy.sh'
16-
DELIDENT:
17-
script: 'dummy.sh'
18-
PING:
19-
script: 'ping.sh'
7+
IDENTITY_PASSWORD_CHANGE:
8+
script: "changepasswd"
9+
onError: 'stop'
10+
IDENTITY_PASSWORD_RESET:
11+
script: "resetpasswd"
12+
onError: 'stop'
Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1+
_version: 1
2+
13
name: 'openldap'
24
description: 'Backend for openldap'
3-
active: 0
5+
active: false
46
actions:
5-
CHANGEPWD:
6-
exec: "changepasswd"
7-
onError: 'stop'
8-
ADDIDENT:
9-
exec: 'dummy.sh'
10-
UPDATEIDENT:
11-
exec: 'dummy.sh'
12-
DELIDENT:
13-
exec: 'dummy.sh'
14-
PING:
15-
exec: 'ping.sh'
7+
IDENTITY_PASSWORD_CHANGE:
8+
exec: "changepasswd"
9+
onError: 'stop'
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
_version: 1
2+
3+
name: 'dummy'
4+
description: 'Dummy backend for tests'
5+
active: true
6+
actions:
7+
IDENTITY_PASSWORD_CHANGE:
8+
script: "dummy.sh"
9+
onError: 'stop'
10+
IDENTITY_PASSWORD_RESET:
11+
script: "dummy.sh"
12+
onError: 'stop'
13+
IDENTITY_CREATE:
14+
script: 'dummy.sh'
15+
onError: 'stop'
16+
IDENTITY_UPDATE:
17+
script: 'dummy.sh'
18+
onError: 'stop'
19+
IDENTITY_DELETE:
20+
script: 'dummy.sh'
21+
onError: 'stop'
22+
PING_TARGET:
23+
script: 'dummy.sh'
24+
onError: 'continue'

backends.example/backend1/bin/exemple.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

backends.example/backend1/config.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

backends.example/dummy/config.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)