Skip to content

Commit 4fa945d

Browse files
authored
Merge pull request #1 from TheDim0n/develop
Develop
2 parents aa3e786 + d082848 commit 4fa945d

File tree

5 files changed

+54
-12
lines changed

5 files changed

+54
-12
lines changed

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,40 @@
1-
PassLocker
1+
# PassLocker
2+
3+
Another secret keys storage tool.
4+
> Please **use this project locally** for more security.
5+
6+
**Content:**
7+
1. [Technology stack](#stack)
8+
2. [Download the project](#download)
9+
3. [Setup environment variables](#envs)
10+
4. [Run with Docker](#run)
11+
---------
12+
## Technology stack <a name="stack"></a>
13+
[![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/)
14+
15+
## Download <a name="download"></a>
16+
```
17+
git clone https://github.com/TheDim0n/PassLocker.git passlocker
18+
cd passlocker
19+
git submodule update --init
20+
```
21+
22+
## Environments <a name="envs"></a>
23+
Create `.env` file in project directory:
24+
```
25+
SECRET_KEY= # secret key for generating JWT
26+
DEFAULT_USER_LOGIN= # your username, must be at least 4 characters
27+
DEFAULT_USER_PASSWORD= # your password, must be at least 8 characters
28+
ACCESS_TOKEN_EXPIRES_MINUTES= # JWT lifetime in minutes
29+
PROXY_PORT= # published port (of your machine)
30+
```
31+
## Run with Docker <a name="run"></a>
32+
```
33+
docker-compose up -d
34+
```
35+
or
36+
```
37+
docker-compose up --build -d
38+
```
39+
Navigate to `http://localhost:<PROXY_PORT>`
40+
> Docs available at `http://localhost:<PROXY_PORT>/api/docs` or `http://localhost:<PROXY_PORT>/api/redoc`

docker-compose.override.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,19 @@ services:
1414
environment:
1515
DATABASE_URL: 'postgresql+psycopg2://postgres:password@database:5432/passlocker_db'
1616
DEBUG: 0
17-
SECRET_KEY: 'secret'
18-
DEFAULT_USER_LOGIN: test
19-
DEFAULT_USER_PASSWORD: password
20-
ACCESS_TOKEN_EXPIRES_MINUTES: 60
17+
ROOT_PATH: /api
18+
SECRET_KEY: ${SECRET_KEY?}
19+
DEFAULT_USER_LOGIN: ${DEFAULT_USER_LOGIN?}
20+
DEFAULT_USER_PASSWORD: ${DEFAULT_USER_PASSWORD?}
21+
ACCESS_TOKEN_EXPIRES_MINUTES: ${ACCESS_TOKEN_EXPIRES_MINUTES?}
2122
depends_on:
2223
- database
2324
frontend:
2425
build: ./frontend
2526
proxy:
2627
build: ./proxy
2728
ports:
28-
- 85:80
29+
- ${PROXY_PORT?}:80
2930

3031
volumes:
3132
pg_data: {}

docker-compose.prod.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ services:
1010
DEFAULT_USER_PASSWORD: ${DEFAULT_USER_PASSWORD?}
1111
ACCESS_TOKEN_EXPIRES_MINUTES: ${ACCESS_TOKEN_EXPIRES_MINUTES?}
1212
DEBUG: 0
13-
resources:
14-
limits:
15-
cpu: 0.5
16-
memory: 100M
13+
ROOT_PATH: /api
14+
deploy:
15+
resources:
16+
limits:
17+
cpus: '0.5'
18+
memory: 100M
1719
proxy:
1820
ports:
1921
- ${PROXY_PORT?}:80

frontend

Submodule frontend updated 48 files

0 commit comments

Comments
 (0)