Skip to content

Commit 2dfb54a

Browse files
committed
Switch to opensource
1 parent f871229 commit 2dfb54a

File tree

4 files changed

+116
-122
lines changed

4 files changed

+116
-122
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Mailrest - Libertech
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 20 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,20 @@
1-
## Description
2-
3-
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
4-
5-
## Installation
6-
7-
Dupliquer le .env.exemple puis supprimer la partie .exemple
8-
Remplir ensuite les variables
9-
10-
Après avoir cloné le depot, lancer une release sur le depot git pour construire l'image si elle n'existe pas
11-
Remplir les variables dans le Makefile, pour l'image, prendre celle du package du depot git commenceant par ghcr.io
12-
Puis lancer la commande
13-
14-
```bash
15-
make exec
16-
yarn install
17-
```
18-
19-
## Running the app
20-
21-
```bash
22-
#Pour lancer la bdd et autre services satelites :
23-
make dbs
24-
25-
#Pour lancer l'application :
26-
make dev
27-
28-
#Pour ajouter une dépendance au projet :
29-
make exec
30-
yarn 'nom de la dependance'
31-
```
32-
Le compte ldap par default est dc@ab.com/test
33-
## Creation d'un service
34-
35-
Lancer la commande make generate
36-
37-
```bash
38-
make generate
39-
40-
yarn run v1.22.19
41-
$ nest g resource
42-
? What name would you like to use for this resource (plural, e.g., "users")? exemple
43-
? What transport layer do you use? REST API
44-
? Would you like to generate CRUD entry points? Yes
45-
CREATE src/exemple/exemple.controller.ts (946 bytes)
46-
CREATE src/exemple/exemple.module.ts (261 bytes)
47-
CREATE src/exemple/exemple.service.ts (649 bytes)
48-
CREATE src/exemple/dto/create-exemple.dto.ts (33 bytes)
49-
CREATE src/exemple/dto/update-exemple.dto.ts (181 bytes)
50-
CREATE src/exemple/entities/exemple.entity.ts (24 bytes)
51-
UPDATE src/app.module.ts (1956 bytes)
52-
```
53-
Cela va créer un nouveau dossier avec [un controller](https://docs.nestjs.com/controllers), un [service](https://docs.nestjs.com/providers) ( egalement appelé provider ), une [entity](https://docs.nestjs.com/techniques/mongodb#model-injection) (equivalent au model), un [module](https://docs.nestjs.com/modules) ainsi que des [DTO](https://docs.nestjs.com/pipes#class-validator)
54-
55-
56-
[Nest Generate](https://docs.nestjs.com/cli/usages#nest-generate)
57-
58-
59-
## Mise en production
60-
61-
- Créer un dossier ui dans le quel il y a un fichier Dockerfile du front ainsi que le .env
62-
- Créer un dossier api dans le quel il y a le .env du back
63-
- Dans le .env du back, remplir les données relatives au ldap
64-
- Dans /ui/.env, changer la variable APP_BASE_URL en mettant le nom du conteneur exemple.api et son port
65-
- Modifier ce docker-compose pour que les noms de services/images soient cohérents
66-
67-
```yml
68-
version: '3'
69-
services:
70-
exemple.ui:
71-
container_name: exemple.ui
72-
build: ./ui/
73-
restart: always
74-
volumes:
75-
- ./ui/.env:/usr/src/app/.env
76-
environment:
77-
- NODE_TLS_REJECT_UNAUTHORIZED=0
78-
ports:
79-
- 3000:3000
80-
networks:
81-
- exemple
82-
83-
exemple.api:
84-
container_name: exemple.api
85-
image: ghcr.io/libertech-fr/exemple.service:latest
86-
restart: always
87-
volumes:
88-
- ./api/.env:/usr/src/app/.env
89-
environment:
90-
- NODE_TLS_REJECT_UNAUTHORIZED=0
91-
ports:
92-
- 4000:4000
93-
networks:
94-
- exemple
95-
- reverse
96-
97-
exemple.mongodb:
98-
container_name: exemple.mongodb
99-
image: mongo:5.0
100-
command: --wiredTigerCacheSizeGB 1.5
101-
restart: always
102-
ports:
103-
- "27017:27017"
104-
volumes:
105-
- ./mongo:/data/db
106-
networks:
107-
- exemple
108-
109-
exemple.redis:
110-
container_name: exemple.redis
111-
image: redis:7.0
112-
restart: always
113-
networks:
114-
- exemple
115-
116-
networks:
117-
exemple:
118-
reverse:
119-
external: true
120-
```
121-
122-
1+
<p align="center">
2+
<a href="http://mailrest.github.io/" target="blank"><img src="./public/logo.svg" width="200" alt="Mailrest Logo" /></a>
3+
</p>
4+
<p align="center">An email retrieval system with a REST API built with NestJS in NodeJS</p>
5+
<p align="center">
6+
<img alt="GitHub all releases" src="https://img.shields.io/github/downloads/libertech-fr/mailrest/total">
7+
<img alt="GitHub" src="https://img.shields.io/github/license/libertech-fr/mailrest">
8+
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/libertech-fr/mailrest">
9+
<a href="https://github.com/Libertech-Fr/mailrest/actions/workflows/release.yml?event=workflow_dispatch"><img alt="GitHub contributors" src="https://github.com/Libertech-Fr/teaket/actions/workflows/release.yml/badge.svg"></a>
10+
</p>
11+
<br>
12+
13+
# Mailrest - Rest API for email retrieval
14+
## Getting started
15+
[WIP]
16+
## Support
17+
Mailrest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here. For personalized support, please contact **Libertech SARL**.
18+
## License
19+
Teaket is [MIT licensed](LICENSE).
20+
If you require a license specific to your needs, please contact **Libertech SARL**.

public/logo.png

32.7 KB
Loading

public/logo.svg

Lines changed: 75 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)