-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.env
149 lines (97 loc) · 4.22 KB
/
.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
###### IMPORTANT NOTE
# For security reasons this file is meant NOT to be commited to the repository,
# but for the purpose of completness of the application it needs to. In a
# normal developement purpose, this file would be shared by other means with
# the development team members.
### Uvicorn Server
###############################################################################
# Please do not modify $BACKEND_HOST
BACKEND_HOST=0.0.0.0
BACKEND_PORT=8080
SERVER_WORKERS=1
### FastAPI application
###############################################################################
PROJECT_TITLE=FastAPI-PostgreSQL-Celery project
# Routers prefixes
API_PREFIX=/api
DOGS_API_PREFIX=/dogs
USERS_API_PREFIX=/users
UPLOAD_API_PREFIX=/upload
SECURITY_PREFIX=/security
CELERY_TASKS_PREFIX=/tasks
### Security config. Each variable should be a comma separated string. ###
ALLOWED_HOSTS=*
ALLOWED_ORIGINS=*
ALLOWED_METHODS=*
ALLOWED_HEADERS=*
# JWT Config
SECRET_KEY=cdd0ad817f0cdbc1f28c532875d2802953ab76e9491da221a848dbc15a2c9fb8
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
# $TOKEN_URI should be hardcoded to meet this format (same reason as $POSGRES_URI)
# $TOKEN_URI=${API_PREFIX}${SECURITY_PREFIX}${TOKEN_RELATIVE_ROUTE}
# e.g. in this case
TOKEN_RELATIVE_ROUTE=/token
TOKEN_URI=/api/security/token
# This fields must match the data stored in ``superusers_db`` variable
# from ``app.db.data.superusers_fake_db`` module
FIRST_SUPERUSER=guane
FIRST_SUPERUSER_PASSWORD=ilovethori
# System path of the png file to upload to $UPLOAD_FILE_URI
# This path should be relative to the ``app.api.routers.upload_file`` module
UPLOAD_FILE_PATH=../../../img/guane-logo.png
### RabbitMQ
###############################################################################
# Please do not modify $RABBITMQ_PORT
RABBITMQ_PORT=5672
RABBITMQ_PORT_2=15672
RABBITMQ_DEFAULT_USER=guane
RABBITMQ_DEFAULT_PASS=ilovefuelai
RABBITMQ_DEFAULT_VHOST=fuelai
# Please hardcode the fields defined before using the format
# amqp://{RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@0.0.0.0:${RABBITMQ_PORT}
# e.g.
RABBITMQ_URI=amqp://guane:ilovefuelai@rabbitmq:5672/fuelai
### Reddis
###############################################################################
CELERY_BAKCEND_URI=redis://redis
# These are just for the local (as opposed to docker) build
REDIS_PORT=6379
### Database Config
###############################################################################
# This values are used by docker
POSTGRES_USER=guane
POSTGRES_PASSWORD=thori
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_DB=guane-default
# Due to some bug in load_dotenv() when run form the docker container, we need to
# hardcode again all the POSTGRES_URI. PLEASE set ${POSTGRES_URI} with THE SAME
# VALUES defined in ${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_HOST},
# ${POSTGRES_PORT}, ${POSTGRES_DB} and using the following format:
# POSTGRES_URI=postgresql+psycopg2://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
# e.g. for the values defined just before:
POSTGRES_URI=postgresql+psycopg2://guane:thori@postgres:5432/guane-default
# Set the URI for your local build (as opposed to docker build)
# In this case it is a userless, paswordless database named `guane`
# listening at localhost:5432
POSTGRES_LOCAL_URI=postgresql+psycopg2://localhost:5432/guane
### Testing Database Config
# This variable is used in the docker image to test the app. Unfortunately, it
# needs to be the same as the usual database, because the postgres docker image
# only creates one database in its initialization script
POSTGRES_TESTS_URI=postgresql+psycopg2://guane:thori@postgres:5432/guane-default
# Set the db URI for your local tests (as opposed to docker tests)
# In this case it is a userless, paswordless database named `guane-tests`
# listening at localhost:5432
POSTGRES_LOCAL_TESTS_URI=postgresql+psycopg2://localhost:5432/guane-tests
### External APIs
###############################################################################
# Requests timeout
REQUESTS_TIMEOUT=20
# Dog API
DOG_API_URI=https://dog.ceo/api/breeds/image/random
# Guane upload file URI
UPLOAD_FILE_URI=https://gttb.guane.dev/api/files
# Guane test celery URI
GUANE_WORKER_URI=https://gttb.guane.dev/api/workers