File tree Expand file tree Collapse file tree 4 files changed +47
-14
lines changed
Expand file tree Collapse file tree 4 files changed +47
-14
lines changed Original file line number Diff line number Diff line change 1- FROM debian:12
2- LABEL description="Libertech Dev" \
3- maintainer="Libertech <aide@libertech.fr>" \
4- vendor=Libertech \
5- name="sesam-daemon-dev"
6-
7- ENV TIMEZONE=Europe/Paris \
8- LANGUAGE=fr_FR.UTF-8 \
9- LANG=fr_FR.UTF-8 \
10- DEBIAN_FRONTEND=noninteractive \
11- TERM=xterm
1+ FROM ghcr.io/libertech-fr/sesame-daemon
122
133RUN apt clean -y \
144 && apt update -y \
@@ -20,7 +10,7 @@ RUN apt clean -y \
2010 && locale-gen ${LANG} \
2111 && dpkg-reconfigure --frontend ${DEBIAN_FRONTEND} locales \
2212 && apt install --no-install-recommends -yq \
23- procps nodejs npm yarn supervisor
13+ procps supervisor
2414
2515RUN npm i -g @nestjs/cli
2616
@@ -29,5 +19,3 @@ WORKDIR /data
2919COPY ./rootfs /
3020
3121CMD ["/usr/bin/supervisord" , "-c" , "/etc/supervisor/supervisord.conf" ]
32-
33-
Original file line number Diff line number Diff line change 1+ include .env
2+ DEV_CONTAINER_NAME = "sesame-daemon"
3+ APPNAME = "sesame"
4+
5+ .DEFAULT_GOAL := help
6+ help :
7+ @printf " \033[33mUsage:\033[0m\n make [target] [arg=\" val\" ...]\n\n\033[33mTargets:\033[0m\n"
8+ @grep -E ' ^[-a-zA-Z0-9_\.\/]+:.*?## .*$$' $(MAKEFILE_LIST ) \
9+ | sort | awk ' BEGIN {FS = ":.*?## "}; {printf " \033[32m%-15s\033[0m %s\n", $$1, $$2}'
10+
11+ build : # # Build development container
12+ @docker compose build $(DEV_CONTAINER_NAME )
13+
14+ dev : # # Run development server
15+ @docker compose run -d --rm \
16+ --service-ports \
17+ --use-aliases \
18+ --name $(DEV_CONTAINER_NAME ) \
19+ $(DEV_CONTAINER_NAME ) yarn start:dev
20+
21+ exec : # # Execute a command in the development container
22+ @docker compose run -it --rm $(DEV_CONTAINER_NAME ) bash
23+
24+ install : # # Execute a command in the development container
25+ @docker compose run -it --rm $(DEV_CONTAINER_NAME ) yarn install
26+
27+ dbs : # # Run dependencies for development
28+ @docker volume create $(APPNAME ) -mongodb
29+ @docker compose up -d $(APPNAME ) -redis $(APPNAME ) -mongo
30+ @docker volume create $(APPNAME ) -redis
31+ @docker run -d --rm \
32+ --name $(APPNAME ) -redis \
33+ -v $(APPNAME ) -redis:/data \
34+ --network dev \
35+ -p 6379:6379 \
36+ --health-interval=5s \
37+ --health-timeout=3s \
38+ --health-start-period=5s \
39+ --health-retries=3 \
40+ --health-cmd=" redis-cli ping || exit 1" \
41+ redis || true
42+
43+ stop : # # Stop all containers
44+ @docker compose down --remove-orphans
45+ @docker compose rm -f
File renamed without changes.
You can’t perform that action at this time.
0 commit comments