Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
webomagic-auth
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Pratik Shrivastava
webomagic-auth
Commits
7722594f
Commit
7722594f
authored
Jul 03, 2024
by
deepdey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add server configuration
parent
9ff3a6b1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
22 deletions
+71
-22
Dockerfile
Dockerfile
+14
-0
app/app_config/config.py
app/app_config/config.py
+1
-0
database/query.sql
database/query.sql
+6
-6
database/schema.sql
database/schema.sql
+16
-16
webomagic-user-docker-compose.yml
webomagic-user-docker-compose.yml
+34
-0
No files found.
Dockerfile
0 → 100644
View file @
7722594f
FROM
ubuntu:22.04
MAINTAINER
WTL
RUN
apt-get update
&&
\
apt-get
install
-y
software-properties-common
&&
\
add-apt-repository
-y
ppa:deadsnakes/ppa
&&
\
apt-get update
&&
\
apt-get
install
-y
python3.10 python3-pip
RUN
mkdir
-p
/home/nkdassh/pyrestapi
RUN
mkdir
-p
/home/nkdassh/pyrestapi/webomagic_user/
WORKDIR
/home/nkdassh/pyrestapi/webomagic_user/
ADD
. /home/nkdassh/pyrestapi/webomagic_user/
RUN
--mount
=
type
=
cache,target
=
/root/.cache pip3
install
-r
requirements.txt
CMD
["main.py"]
ENTRYPOINT
["python3"]
app/app_config/config.py
View file @
7722594f
...
...
@@ -10,6 +10,7 @@ POSTGRES: dict = {
'user'
:
os
.
environ
.
get
(
'POSTGRES_USER'
,
'postgres'
),
'db'
:
os
.
environ
.
get
(
'POSTGRES_DB'
,
'user_db'
),
'host'
:
os
.
environ
.
get
(
'POSTGRES_HOST'
,
'127.0.0.1'
),
# 'password': urllib.parse.quote(os.environ.get('POSTGRES_PASSWORD', 'P@$$w0rdIITKGP')),
'password'
:
urllib
.
parse
.
quote
(
os
.
environ
.
get
(
'POSTGRES_PASSWORD'
,
'2580'
)),
'port'
:
os
.
environ
.
get
(
'POSTGRES_PORT'
,
'5432'
)
}
...
...
database/query.sql
View file @
7722594f
...
...
@@ -13,13 +13,13 @@ INSERT INTO
)
VALUES
(
'
deepdey
'
,
'
Deep
'
,
'
Dey
'
,
'
lamartiniere
'
,
'
La Martiniere
'
,
''
,
'$2b$12$du0B3AlnD5wOYxt.ADYPwuaCFqF7R3XrLHDiNca4FvVtTGPIQVEu2'
,
'
8697448896
'
,
'
deep.websofttechs@gmail.com
'
,
'
MALE
'
,
'
03340406612
'
,
'
admin@lamartiniere.co
'
,
'
UNDEFINED
'
,
true
,
0
);
database/schema.sql
View file @
7722594f
...
...
@@ -14,22 +14,6 @@ CREATE TABLE
updated_at
TIMESTAMP
);
CREATE
TABLE
IF
NOT
EXISTS
role
(
id
BIGSERIAL
PRIMARY
KEY
NOT
NULL
,
role_type_id
BIGINT
NOT
NULL
,
role_name
VARCHAR
(
80
)
NOT
NULL
,
project_id
BIGINT
NOT
NULL
,
is_deleted
BOOLEAN
DEFAULT
false
,
created_at
TIMESTAMP
NOT
NULL
DEFAULT
now
(),
created_by
BIGINT
NOT
NULL
,
updated_at
TIMESTAMP
updated_by
BIGINT
,
FOREIGN
KEY
(
role_type_id
)
REFERENCES
role_type
(
id
),
FOREIGN
KEY
(
created_by
)
REFERENCES
webomagic_user
(
id
),
FOREIGN
KEY
(
updated_by
)
REFERENCES
webomagic_user
(
id
)
);
CREATE
TABLE
IF
NOT
EXISTS
webomagic_user
(
id
BIGSERIAL
PRIMARY
KEY
NOT
NULL
,
...
...
@@ -45,4 +29,20 @@ CREATE TABLE
is_deleted
BOOLEAN
DEFAULT
false
,
created_at
TIMESTAMP
NOT
NULL
DEFAULT
now
(),
updated_at
TIMESTAMP
);
CREATE
TABLE
IF
NOT
EXISTS
role
(
id
BIGSERIAL
PRIMARY
KEY
NOT
NULL
,
role_type_id
BIGINT
NOT
NULL
,
role_name
VARCHAR
(
80
)
NOT
NULL
,
project_id
BIGINT
NOT
NULL
,
is_deleted
BOOLEAN
DEFAULT
false
,
created_at
TIMESTAMP
NOT
NULL
DEFAULT
now
(),
created_by
BIGINT
NOT
NULL
,
updated_at
TIMESTAMP
,
updated_by
BIGINT
,
FOREIGN
KEY
(
role_type_id
)
REFERENCES
role_type
(
id
),
FOREIGN
KEY
(
created_by
)
REFERENCES
webomagic_user
(
id
),
FOREIGN
KEY
(
updated_by
)
REFERENCES
webomagic_user
(
id
)
);
\ No newline at end of file
webomagic-user-docker-compose.yml
0 → 100644
View file @
7722594f
version
:
'
3.8'
services
:
webomagic-redis
:
container_name
:
webomagic-redis
image
:
'
redis'
command
:
[
'
redis-server'
,
'
--appendonly'
,
'
yes'
]
ports
:
-
'
6377:6379'
environment
:
-
ALLOW_EMPTY_PASSWORD=yes
-
REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
volumes
:
-
./webomagic-redis:/data
restart
:
always
webomagic-user-backend
:
container_name
:
webomagic-user-backend
image
:
webomagic-user-backend
ports
:
-
'
5011:5011'
depends_on
:
-
webomagic-redis
volumes
:
-
./logs/webomagic-user-backend:/home/iitkgpssh/docker/logs/
environment
:
-
SERVER_HOST=0.0.0.0
-
SERVER_PORT=5011
-
POSTGRES_USER=webomagic_python_db
-
POSTGRES_DB=webomagic_user
-
POSTGRES_HOST=103.154.184.85
-
POSTGRES_PORT=5433
-
REDIS_HOST=103.154.184.85
-
REDIS_PORT=6377
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment