-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
πββοΈ README.md Setup locally
- Loading branch information
Showing
3 changed files
with
81 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ DocFlow is a powerful Document Management API designed to streamline document ha | |
|
||
|
||
## π API Documentation and Image | ||
|
||
Explore the [API Documentation](https://documenter.getpostman.com/view/20984268/2s9YRGxUcp) for detailed information on how to use DocFlow's features. | ||
|
||
Download docker image from [docker-hub](https://hub.docker.com/r/jiisanda/docflow). | ||
|
@@ -37,6 +38,10 @@ Or just run | |
docker pull jiisanda/docflow:1 | ||
``` | ||
|
||
## πΈ Setup Docflow | ||
|
||
Follow the steps outlined in the [setup.md](app/docs/setup.md) file | ||
|
||
## 𧩠Implementation Detail | ||
|
||
|
||
|
@@ -88,4 +93,4 @@ For detailed instructions, visit the [Document Preview Documentation](https://gi | |
|
||
For any questions or support, please [contact](mailto:[email protected]). | ||
|
||
Enjoy using DocFlow to manage your documents seamlessly! | ||
Test DocFlow to manage documents seamlessly! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# π Setting up Docflow Locally | ||
|
||
Just a 3-step process to get Docflow up and running on your local machine! π | ||
|
||
### 1οΈβ£ Clone the repository | ||
|
||
```bash | ||
git clone https://www.github.com/jiisanda/docflow.git | ||
``` | ||
|
||
### 2οΈβ£ Configure Your Environment | ||
|
||
Start by creating your environment file using the provided [sample_env.txt](commands/sample_env.txt). This file contains all the necessary | ||
environment variables for Docflow. Save it inside the app/ directory. | ||
|
||
#### PostgreSQL Setup | ||
|
||
Set up your PostgreSQL environment variables: | ||
|
||
- `DATABASE_HOSTNAME`: By default, set to `postgres`. | ||
- `POSTGRES_USER`, `POSTGRES_PASSWORD` and `POSTGRES_PORT`: Enter your PostgreSQL username, password, and port | ||
(default is `5432`). | ||
- `POSTGRES_DB` and `POSTGRES_DB_TESTS`: Specify your database names (`POSTGRES_DB_TESTS` can be left blank). | ||
|
||
#### AWS Setup | ||
For AWS credentials (`AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`), follow these steps: | ||
|
||
>1. Sign in to the [AWS Management Console]() using your AWS account's root user credentials. | ||
>2. Navigate to Security Credentials and create an access key. | ||
>3. Copy the access key ID and secret key securely. | ||
>4. For S3 bucket setup, refer to creating a [bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-bucket.html). | ||
> | ||
> Source: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user_manage_add-key.html | ||
#### User Environment | ||
|
||
Keep `ACCESS_TOKEN_EXPIRE_MIN` and `REFRESH_TOKEN_EXPIRE_MIN` as default. Update the `ALGORITHM` of your choice (e.g., `HS256` or `RS256`). | ||
|
||
Generate `JWT_SECRET_KEY` and `JWT_REFRESH_SECRET_KEY` using Python: | ||
```bash | ||
docflow$ python | ||
>> import secrets | ||
>> secrets.token_urlsafe(length=32) | ||
'some-random-secret-of-length-32' | ||
>> secret.token_hex(length=32) | ||
'some-random-secret-of-length-32' | ||
``` | ||
#### Email Service | ||
|
||
This section explains how to set up the email service using Gmail. Configure the following variables: | ||
|
||
`SMTP_SERVER`: `smtp.gmail.com` | ||
`SMTP_PORT`: `587` | ||
`EMAIL`: `Your email address used to create the app`. | ||
`APP_PASSWORD`: `Generate an app password from your Google Account`. | ||
Before starting, ensure you have enabled "Two-Factor Authentication" and "Less secure app access" for your Gmail account. | ||
|
||
>For a deeper understanding of environment variables in Python, check out this article: | ||
>[@dev.to/jiisanda](https://dev.to/jiisanda/how-does-python-dotenv-simplify-configuration-management-3ne6) | ||
|
||
### 3οΈβ£ Run with Docker-Compose | ||
|
||
Ensure Docker is installed, then run: | ||
|
||
```commandline | ||
docker-compose up --build | ||
``` | ||
|
||
That's it! Docflow is now running on localhost:8000. | ||
|
||
## βοΈ Next Step | ||
To test it, use Postman following the steps in | ||
[postman.md](features/postman.md). |