Skip to content

Commit 318833f

Browse files
committed
docker
1 parent 8c8b879 commit 318833f

File tree

6 files changed

+41
-16
lines changed

6 files changed

+41
-16
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@
2727
Daemon pour Sesame. Le demon est chargé d'executer les backends sur les ordres de l'orchestrator
2828
## Installation developpement
2929
un environnement de developpement est donné en docker
30+
### Docker
31+
contruisez l'image :
32+
dans ./docker
33+
````bash
34+
docker-compose build
35+
````
36+
Puis lancer le
37+
````bash
38+
docker-compose up -d
39+
````
40+
Installation
41+
````bash
42+
docker exec sesame-daemon yarn
43+
````
44+
45+
3046

3147

3248
### Installation système

backends/backend1/config.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@ description: 'Config1 backend for tests'
44
active: 1
55
actions:
66
CHANGEPWD:
7-
exec: "changepasswd.sh"
8-
onError: 'stop'
7+
exec: "exemple.sh"
8+
onError: 'continue'
99
ADDIDENT:
10-
exec: 'dummy.sh'
10+
exec: 'exemple.sh'
11+
onError: 'continue'
1112
UPDATEIDENT:
12-
exec: 'dummy.sh'
13+
exec: 'exemple.sh'
14+
onError: 'continue'
1315
DELIDENT:
14-
exec: 'dummy.sh'
16+
exec: 'exemple.sh'
17+
onError: 'continue'
1518
PING:
16-
exec: 'ping.sh'
19+
exec: 'exemple.sh'
20+
onError: 'continue'
1721

backends/dummy/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ actions:
77
onError: 'stop'
88
ADDIDENT:
99
exec: 'dummy.sh'
10+
onError: 'stop'
1011
UPDATEIDENT:
1112
exec: 'dummy.sh'
13+
onError: 'stop'
1214
DELIDENT:
1315
exec: 'dummy.sh'
16+
onError: 'stop'
1417

1518

docker/Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@ FROM debian:12
22
LABEL description="Libertech Dev" \
33
maintainer="Libertech <aide@libertech.fr>" \
44
vendor=Libertech \
5-
name="daemonjsdev"
5+
name="sesam-daemon-dev"
66

77
ENV TIMEZONE=Europe/Paris \
88
LANGUAGE=fr_FR.UTF-8 \
99
LANG=fr_FR.UTF-8 \
1010
DEBIAN_FRONTEND=noninteractive \
11-
SUPERVISOR_VERSION=4.0.1 \
12-
GOSU_VERSION=1.11 \
13-
TERM=xterm \
14-
BRANCHNAME=master
11+
TERM=xterm
1512

1613
RUN apt clean -y \
1714
&& apt update -y \
@@ -24,8 +21,11 @@ RUN apt clean -y \
2421
&& dpkg-reconfigure --frontend ${DEBIAN_FRONTEND} locales \
2522
&& apt install --no-install-recommends -yq \
2623
procps nodejs npm yarn supervisor
27-
28-
WORKDIR /usr/app/src
24+
25+
RUN npm i -g @nestjs/cli
26+
27+
RUN npm i -g yarn
28+
WORKDIR /data
2929
COPY ./rootfs /
3030

3131
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]

docker/docker-compose.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
version: '3'
22
services:
3-
test-daemon:
3+
sesame-daemon:
44
build: .
5-
container_name: testdaemon
5+
container_name: sesame-daemon
66
volumes:
7-
- "./src:/data"
7+
- "..:/data"
88
networks:
99
- dev
10+
ports:
11+
- "9229:9229"
1012
networks:
1113
dev:
1214
external: true

0 commit comments

Comments
 (0)