-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes
40 lines (31 loc) · 1.39 KB
/
notes
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
docker-compose commands:
docker-compose down -v
docker-compose build
docker-compose up
Useful links:
https://testdriven.io/blog/dockerizing-flask-with-postgres-gunicorn-and-nginx/
To check that postgressql set up OK, run the following commands
[elena@elena-VB: ...sktop/docker_flask/services/web]$ docker-compose exec db psql --username=elena --dbname=psql_dev
[elena@elena-VB: ...sktop/docker_flask/services/web]$ sudo docker-compose exec db psql --username=elena --dbname=psql_dev
psql (13.9)
Type "help" for help.
psql_dev=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+-------+----------+------------+------------+-------------------
postgres | elena | UTF8 | en_US.utf8 | en_US.utf8 |
psql_dev | elena | UTF8 | en_US.utf8 | en_US.utf8 |
template0 | elena | UTF8 | en_US.utf8 | en_US.utf8 | =c/elena +
| | | | | elena=CTc/elena
template1 | elena | UTF8 | en_US.utf8 | en_US.utf8 | =c/elena +
| | | | | elena=CTc/elena
(4 rows)
psql_dev=# \c psql_dev
You are now connected to database "psql_dev" as user "elena".
psql_dev=# \dt
List of relations
Schema | Name | Type | Owner
--------+-------+-------+-------
public | users | table | elena
(1 row)
psql_dev=# \q