Skip to content

Commit 4771034

Browse files
Use mongodb
1 parent 4cad17d commit 4771034

File tree

15 files changed

+401
-272
lines changed

15 files changed

+401
-272
lines changed

.env.template

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,4 @@
22
# Needed because of the presence of the "todo_app" folder
33
FLASK_APP=todo_app/app
44

5-
TRELLO_API_KEY=<DELIBERATELY MISSING>
6-
TRELLO_API_TOKEN=<DELIBERATELY MISSING>
7-
TRELLO_BOARD_ID=<DELIBERATELY MISSING>
8-
TRELLO_TODO_LIST_ID=<DELIBERATELY MISSING>
9-
TRELLO_DONE_LIST_ID=<DELIBERATELY MISSING>
5+
MONGODB_PRIMARY_CONNECTION_STRING=<DELIBERATELY MISSING>

.env.test

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,5 @@
22
# Needed because of the presence of the "todo_app" folder
33
FLASK_APP=todo_app/app
44

5-
TRELLO_API_KEY=TRELLO_API_KEY
6-
TRELLO_API_TOKEN=TRELLO_API_TOKEN
7-
TRELLO_BOARD_ID=TRELLO_BOARD_ID
5+
MONGODB_PRIMARY_CONNECTION_STRING=mongodb://fakemongo.com
86

9-
TRELLO_TODO_LIST_ID=TRELLO_TODO_LIST_ID
10-
TRELLO_DONE_LIST_ID=TRELLO_DONE_LIST_ID

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,10 @@ $ cp .env.template .env # (first time only)
4747
The `.env` file is used by flask to set environment variables when running `flask run`.
4848
This enables things like development mode (which also enables features like hot reloading when you make a file change).
4949

50-
### Trello
50+
### MongoDB
5151

52-
The `.env` file also includes environment variables required to integrate with Trello.
53-
These variables have deliberately been left blank in the `.env.template` file.
54-
Replace the board and list ids with the respective ids from your Trello board.
52+
The `.env` file also includes environment variables required to connect to a mongodb instance.
53+
This variable has deliberately been left blank in the `.env.template` file.
5554

5655
## Running the App
5756

@@ -103,10 +102,10 @@ These values can be seen in the `ansible/vars/env.yml` file.
103102

104103
The values are individually encrypted using ansible-vault and added to the file.
105104

106-
To generate a new encrypted value or to replace one of the provided values, for example, the `trello_api_key` value:
105+
To generate a new encrypted value or to replace one of the provided values:
107106

108107
```bash
109-
$ ansible-vault encrypt_string --vault-password-file your_password_file --name 'trello_api_key'
108+
$ ansible-vault encrypt_string --vault-password-file your_password_file --name '<key_name>'
110109
```
111110

112111
then enter the value you want to encrypt when prompted.

ansible/.env.j2

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,4 @@ FLASK_APP=todo_app/app
44

55
FLASK_ENV=production
66

7-
TRELLO_API_KEY={{ trello_api_key }}
8-
TRELLO_API_TOKEN={{ trello_api_token }}
9-
TRELLO_BOARD_ID={{ trello_board_id }}
10-
11-
TRELLO_TODO_LIST_ID={{ trello_todo_list_id }}
12-
TRELLO_DONE_LIST_ID={{ trello_done_list_id }}
7+
MONGODB_PRIMARY_CONNECTION_STRING = {{ mongodb_primary_connection_string }}

ansible/vars/env.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)