You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any of the above commands creates three users with the following passwords:
47
+
21
48
-**Admin credentials ->***username:*[email protected] and *password:* admin
22
49
-**Manager credentials ->***username:*[email protected] and *password:* admin
23
50
-**User credentials ->***username:*[email protected] and *password:* admin
24
51
25
-
You can connect to the Database using PGAdmin4 and use the credentials from .env file. Database port on local machine has been configured to **5454** on docker-compose-dev.yml file
52
+
You can connect to the Database using pgAdmin4 and use the credentials from .env file. Database port on local machine has been configured to **5454** on docker-compose-dev.yml file
53
+
54
+
(Optional) If you prefer you can run pgAdmin4 on a docker container using the following commands, they should executed on different terminals:
55
+
56
+
*Starts pgadmin*
57
+
```sh
58
+
make run-pgadmin
59
+
```
60
+
61
+
*Load server configuration (It is required just the first time)*
62
+
```sh
63
+
make load-server-pgadmin
64
+
```
65
+
66
+
This starts pgamin in [http://localhost:15432](http://localhost:15432).
26
67
27
68
<palign="center">
28
69
<imgsrc="static/tables.png"align="center"/>
@@ -72,15 +113,22 @@ This template allows users can upload their photos. The images are stored using
72
113
73
114
## Run Alembic migrations (Only if you change the DB model)
docker compose -f docker-compose-dev.yml exec fastapi_server alembic upgrade head
78
120
```
79
121
122
+
*Using Makefile command*
123
+
```sh
124
+
make init-db
125
+
```
126
+
80
127
## Production Deployment
81
128
Remember to use a persistant PostgreSQL database, update the new credentials on .env file and use this command to run the project in a production environment. For testing this configuration on localhost you can uncomment the database container and
82
129
depends_on of fastapi container otherwise it will not work on a local environment.
0 commit comments