Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mason-today-web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
mason-today-web
Commits
b2a545e4
Commit
b2a545e4
authored
Jul 10, 2019
by
Nicholas J Anderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Python3 support, Docker image, CI builds
parent
bec61ca7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
5 deletions
+54
-5
.gitlab-ci.yml
.gitlab-ci.yml
+15
-0
Dockerfile
Dockerfile
+12
-0
docker-cloud.yml
docker-cloud.yml
+20
-0
mason-today/__init__.py
mason-today/__init__.py
+2
-3
mason-today/parscript.py
mason-today/parscript.py
+1
-1
mason-today/redisactions.py
mason-today/redisactions.py
+4
-1
No files found.
.gitlab-ci.yml
0 → 100644
View file @
b2a545e4
stages
:
-
build
build
:
stage
:
build
retry
:
2
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
script
:
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE/api:$CI_COMMIT_TAG
only
:
-
tags
Dockerfile
0 → 100644
View file @
b2a545e4
FROM
python:3
COPY
mason-today /usr/local/mason-today
COPY
requirements.txt /usr/local/mason-today/requirements.txt
RUN
pip
install
--no-cache-dir
-r
/usr/local/mason-today/requirements.txt
WORKDIR
/usr/local/mason-today
ENV
PYTHONPATH=/usr/local/mason-today/__init__.py
ENV
FLASK_APP=mason-today
ENV
FLASK_DEBUG=0
CMD
[ "flask", "run" ]
docker-cloud.yml
0 → 100644
View file @
b2a545e4
---
version
:
'
3.7'
network
:
front
:
back
:
internal
:
yes
service
:
api
:
image
:
registry.srct.gmu.edu/srct/mason-today-web/api:latest
environment
:
FLASK_DEBUG
:
0
REDIS_HOST
:
db
network
:
front
:
back
:
db
:
image
:
redis
network
:
back
:
mason-today/__init__.py
View file @
b2a545e4
...
...
@@ -10,7 +10,6 @@ from multiprocessing import Process
# python imports
import
json
import
thread
# other imports
import
redis
...
...
@@ -57,7 +56,7 @@ try:
except
Exception
as
e
:
print
(
e
)
print
"==================================================="
\
print
(
"==================================================="
\
+
"Unable to start scheduling thread"
\
+
traceback
.
print_exc
(
file
=
sys
.
stdout
)
\
+
"==================================================="
\ No newline at end of file
+
"==================================================="
)
mason-today/parscript.py
View file @
b2a545e4
...
...
@@ -262,7 +262,7 @@ def load_data():
del
location
[
-
1
]
else
:
location
=
[
location
]
except
Exception
:
except
Exception
as
e
:
error
.
append
(
"Location Error: "
+
str
(
e
))
try
:
...
...
mason-today/redisactions.py
View file @
b2a545e4
...
...
@@ -17,7 +17,10 @@ import redis
# setting up redis database
redisdb
=
redis
.
from_url
(
"redis://localhost:6379/0"
,
db
=
0
)
redis_host
=
os
.
environ
.
get
(
"REDIS_HOST"
,
"localhost"
)
redis_port
=
os
.
environ
.
get
(
"REDIS_PORT"
,
"6379"
)
redisdb
=
redis
.
from_url
(
"redis://{0}:{1}/0"
.
format
(
redis_host
,
redis_port
),
db
=
0
)
# this will update the live dictlist and the cachedate
...
...
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