File tree 3 files changed +49
-22
lines changed
3 files changed +49
-22
lines changed Original file line number Diff line number Diff line change 2
2
3
3
server : backend
4
4
backend :
5
+ @docker-compose up -d
5
6
@python manage.py runserver
6
7
7
8
frontend :
@@ -23,10 +24,12 @@ clean:
23
24
@find . -type d -name ' __pycache__' -delete
24
25
25
26
reset-db :
26
- @sudo -iu postgres bash -c " psql -c 'DROP DATABASE IF EXISTS coobs;'"
27
- @sudo -iu postgres bash -c " psql -c 'CREATE DATABASE coobs;'"
28
- @sudo -iu postgres bash -c " psql -c 'GRANT ALL PRIVILEGES ON DATABASE coobs TO coobs;'"
29
- @sudo -iu postgres bash -c " psql -c 'ALTER USER coobs CREATEDB;'"
27
+ @psql -h localhost -U postgres -c " DROP DATABASE IF EXISTS coobs;"
28
+ @psql -h localhost -U postgres -c " CREATE DATABASE coobs;"
29
+ @psql -h localhost -U postgres -c " DROP ROLE IF EXISTS coobs;"
30
+ @psql -h localhost -U postgres -c " CREATE ROLE coobs WITH LOGIN CREATEDB PASSWORD 'coobspass';"
31
+ @psql -h localhost -U postgres -c " ALTER DATABASE coobs OWNER TO coobs;"
32
+ @psql -h localhost -U postgres -c " GRANT ALL PRIVILEGES ON DATABASE coobs TO coobs;"
30
33
@echo " \033[0;32mDB reset done! => Running migrations.."
31
34
@$(MAKE ) -s migration
32
35
@echo " \033[0;32mMigrations done! => Creating superuser.."
Original file line number Diff line number Diff line change 1
- # Tools
2
- postgres :
3
- image : postgres
4
- ports :
5
- - " 5432:5432"
6
- volumes_from :
7
- - ' data'
8
- environment :
9
- POSTGRES_USER : " postgres"
10
- POSTGRES_PASSWORD : " postgres"
11
- volumes :
12
- - " /tmp:/tmp"
1
+ version : " 3.8"
13
2
14
- data :
15
- image : busybox
16
- volumes :
17
- - ./data:/data
3
+ services :
4
+ postgres :
5
+ container_name : postgres
6
+ image : postgres:12.1
7
+ hostname : postgres
8
+ environment :
9
+ POSTGRES_USER : postgres
10
+ POSTGRES_PASSWORD : postgres
11
+ ports :
12
+ - " 5432:5432"
13
+ volumes :
14
+ - ' pg_data:/var/lib/postgresql/data'
15
+ networks :
16
+ close :
17
+ aliases :
18
+ - postgres
19
+
20
+ pgadmin :
21
+ container_name : pgadmin
22
+ image : dpage/pgadmin4:6.21
23
+ environment :
24
+
25
+ - PGADMIN_DEFAULT_PASSWORD=admin
26
+ ports :
27
+ - " 5050:80"
28
+ volumes :
29
+ - ' pgadmin_data:/var/lib/pgadmin'
30
+ networks :
31
+ close :
32
+ aliases :
33
+ - pgadmin
34
+
35
+ networks :
36
+ close :
37
+ driver : bridge
38
+
39
+ volumes :
40
+ pg_data :
41
+ pgadmin_data :
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ markdownify==0.6.5
35
35
MarkupSafe == 1.1.1
36
36
mccabe == 0.6.1
37
37
openapi-codec == 1.3.2
38
- Pillow == 8.2.0
38
+ Pillow == 8.3.2
39
39
psycopg2 == 2.8.6
40
40
pycparser == 2.20
41
41
Pygments == 2.8.1
@@ -53,7 +53,7 @@ six==1.15.0
53
53
soupsieve == 2.2
54
54
sqlparse == 0.4.1
55
55
tinycss2 == 1.1.0
56
- typed-ast == 1.4.2
56
+ typed-ast == 1.5.4
57
57
uritemplate == 3.0.1
58
58
urllib3 == 1.26.5
59
59
webencodings == 0.5.1
You can’t perform that action at this time.
0 commit comments