Skip to content

Commit

Permalink
Merge pull request #1 from TheDim0n/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
TheDim0n authored Dec 28, 2021
2 parents aa3e786 + d082848 commit 4fa945d
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 12 deletions.
41 changes: 40 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,40 @@
PassLocker
# PassLocker

Another secret keys storage tool.
> Please **use this project locally** for more security.
**Content:**
1. [Technology stack](#stack)
2. [Download the project](#download)
3. [Setup environment variables](#envs)
4. [Run with Docker](#run)
---------
## Technology stack <a name="stack"></a>
[![FastAPI](https://img.shields.io/badge/FastAPI-005571?style=for-the-badge&logo=fastapi)](https://fastapi.tiangolo.com/)[![Angular](https://img.shields.io/badge/angular-%23DD0031.svg?style=for-the-badge&logo=angular&logoColor=white)](https://angular.io/)[![Postgres](https://img.shields.io/badge/postgres-%23316192.svg?style=for-the-badge&logo=postgresql&logoColor=white)](https://www.postgresql.org/)[![Nginx](https://img.shields.io/badge/nginx-%23009639.svg?style=for-the-badge&logo=nginx&logoColor=white)](https://nginx.org/)[![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white)](https://www.docker.com/)

## Download <a name="download"></a>
```
git clone https://github.com/TheDim0n/PassLocker.git passlocker
cd passlocker
git submodule update --init
```

## Environments <a name="envs"></a>
Create `.env` file in project directory:
```
SECRET_KEY= # secret key for generating JWT
DEFAULT_USER_LOGIN= # your username, must be at least 4 characters
DEFAULT_USER_PASSWORD= # your password, must be at least 8 characters
ACCESS_TOKEN_EXPIRES_MINUTES= # JWT lifetime in minutes
PROXY_PORT= # published port (of your machine)
```
## Run with Docker <a name="run"></a>
```
docker-compose up -d
```
or
```
docker-compose up --build -d
```
Navigate to `http://localhost:<PROXY_PORT>`
> Docs available at `http://localhost:<PROXY_PORT>/api/docs` or `http://localhost:<PROXY_PORT>/api/redoc`
11 changes: 6 additions & 5 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@ services:
environment:
DATABASE_URL: 'postgresql+psycopg2://postgres:password@database:5432/passlocker_db'
DEBUG: 0
SECRET_KEY: 'secret'
DEFAULT_USER_LOGIN: test
DEFAULT_USER_PASSWORD: password
ACCESS_TOKEN_EXPIRES_MINUTES: 60
ROOT_PATH: /api
SECRET_KEY: ${SECRET_KEY?}
DEFAULT_USER_LOGIN: ${DEFAULT_USER_LOGIN?}
DEFAULT_USER_PASSWORD: ${DEFAULT_USER_PASSWORD?}
ACCESS_TOKEN_EXPIRES_MINUTES: ${ACCESS_TOKEN_EXPIRES_MINUTES?}
depends_on:
- database
frontend:
build: ./frontend
proxy:
build: ./proxy
ports:
- 85:80
- ${PROXY_PORT?}:80

volumes:
pg_data: {}
10 changes: 6 additions & 4 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ services:
DEFAULT_USER_PASSWORD: ${DEFAULT_USER_PASSWORD?}
ACCESS_TOKEN_EXPIRES_MINUTES: ${ACCESS_TOKEN_EXPIRES_MINUTES?}
DEBUG: 0
resources:
limits:
cpu: 0.5
memory: 100M
ROOT_PATH: /api
deploy:
resources:
limits:
cpus: '0.5'
memory: 100M
proxy:
ports:
- ${PROXY_PORT?}:80
2 changes: 1 addition & 1 deletion frontend
Submodule frontend updated 48 files
+14 −1 .github/workflows/ci_cd.yml
+1 −1 README.md
+21 −0 package-lock.json
+1 −0 package.json
+3 −0 src/app/app.component.html
+17 −2 src/app/app.module.ts
+41 −0 src/app/components/add-secret/add-secret.component.html
+69 −0 src/app/components/add-secret/add-secret.component.scss
+25 −0 src/app/components/add-secret/add-secret.component.spec.ts
+30 −0 src/app/components/add-secret/add-secret.component.ts
+22 −0 src/app/components/card/card.component.html
+62 −0 src/app/components/card/card.component.scss
+25 −0 src/app/components/card/card.component.spec.ts
+30 −0 src/app/components/card/card.component.ts
+15 −0 src/app/components/header/header.component.html
+94 −0 src/app/components/header/header.component.scss
+25 −0 src/app/components/header/header.component.spec.ts
+38 −0 src/app/components/header/header.component.ts
+4 −0 src/app/components/load-modal/load-modal.component.html
+39 −0 src/app/components/load-modal/load-modal.component.scss
+25 −0 src/app/components/load-modal/load-modal.component.spec.ts
+16 −0 src/app/components/load-modal/load-modal.component.ts
+5 −2 src/app/components/login/login.component.html
+2 −36 src/app/components/login/login.component.scss
+18 −8 src/app/components/login/login.component.ts
+7 −1 src/app/components/main-page/main-page.component.html
+12 −6 src/app/components/main-page/main-page.component.scss
+35 −2 src/app/components/main-page/main-page.component.ts
+14 −0 src/app/components/remove-modal/remove-modal.component.html
+57 −0 src/app/components/remove-modal/remove-modal.component.scss
+25 −0 src/app/components/remove-modal/remove-modal.component.spec.ts
+34 −0 src/app/components/remove-modal/remove-modal.component.ts
+8 −0 src/app/interfaces/Secret.ts
+28 −3 src/app/shared/auth.service.ts
+16 −0 src/app/shared/close-modal.service.spec.ts
+19 −0 src/app/shared/close-modal.service.ts
+16 −0 src/app/shared/loader.service.spec.ts
+18 −0 src/app/shared/loader.service.ts
+16 −0 src/app/shared/remove-modal.service.spec.ts
+27 −0 src/app/shared/remove-modal.service.ts
+16 −0 src/app/shared/secret.service.spec.ts
+52 −0 src/app/shared/secret.service.ts
+4 −0 src/assets/images/Menu.svg
+3 −0 src/assets/images/close.svg
+3 −0 src/assets/images/copy.svg
+3 −0 src/assets/images/delete.svg
+4 −0 src/assets/images/tooltip.svg
+88 −1 src/styles.scss

0 comments on commit 4fa945d

Please sign in to comment.