Skip to content

Commit

Permalink
Merge pull request #71 from WHOIGit/dev
Browse files Browse the repository at this point in the history
merge a1 into master
  • Loading branch information
joefutrelle authored May 29, 2019
2 parents 7cd33c5 + 968f89d commit e7c2191
Show file tree
Hide file tree
Showing 78 changed files with 32,214 additions and 217 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,6 @@ pyifcb
pg_data
ifcb_data
static

.DS_Store
.vscode
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from continuumio/miniconda3
from continuumio/miniconda3:4.5.12

RUN apt-get update

# geospatial libraries
RUN apt-get install -y binutils libproj-dev gdal-bin

# nomkl to reduce image size (mkl is large)
RUN conda install nomkl

# gunicorn to run the WSGI app
RUN conda install gunicorn

# install pyifcb and ifcbdb dependencies first
# pyifcb must be cloned into the same directory as this dockerfile

Expand All @@ -25,6 +25,8 @@ RUN python setup.py develop

# this application

RUN conda install gunicorn=19.9.0

EXPOSE 8000

# descend into app directory
Expand Down
3 changes: 3 additions & 0 deletions bin/assets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker exec -it ifcbdb python manage.py collectstatic --no-input
3 changes: 3 additions & 0 deletions bin/clearcache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker exec -it ifcbdb python manage.py clearcache
3 changes: 3 additions & 0 deletions bin/migrate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker exec -it ifcbdb python manage.py migrate
4 changes: 4 additions & 0 deletions bin/pshell.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

docker exec -it ifcbdb python manage.py shell

4 changes: 4 additions & 0 deletions bin/psql.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

docker exec -it postgres psql -U ifcb -W

4 changes: 4 additions & 0 deletions bin/shell.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

docker exec -it ifcbdb bash

42 changes: 40 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,32 @@ services:
networks:
- nginx_network
- postgres_network
- memcached_network
- redis_network
depends_on:
- postgres
- memcached
- redis

celery:
build: .
container_name: celery
command: celery -A ifcbdb worker -l info
volumes:
- ./pyifcb:/pyifcb
- ./ifcbdb:/ifcbdb
- ./ifcb_data:/data
depends_on:
- postgres
- memcached
- redis
networks:
- redis_network
- postgres_network
- memcached_network

nginx:
image: nginx:latest
image: nginx:1.15
container_name: nginx
ports:
- 8000:80
Expand All @@ -29,7 +50,7 @@ services:
- nginx_network

postgres:
image: mdillon/postgis
image: mdillon/postgis:11-alpine
container_name: postgres
environment:
- POSTGRES_USER=ifcb
Expand All @@ -40,8 +61,25 @@ services:
networks:
- postgres_network

memcached:
image: memcached:1.5.12-alpine
container_name: memcached
command: ["-m", "64m"]
networks:
- memcached_network

redis:
image: redis:5.0.4-alpine
container_name: redis
networks:
- redis_network

networks:
nginx_network:
driver: bridge
postgres_network:
driver: bridge
memcached_network:
driver: bridge
redis_network:
driver: bridge
17 changes: 14 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
name: ifcbdb
channels:
- conda-forge
dependencies:
- python>=3.7
- django
- psycopg2
- python=3.6
- django=2.1.7
- psycopg2=2.7.6.1
- pycrypto=2.6.1
- pip=19.0.3
- kombu=4.1.0
- celery=4.1.0
- gdal=2.4.0
- libiconv=1.15
- pip:
- python-memcached==1.59
- redis==2.10.6
177 changes: 170 additions & 7 deletions ifcbdb/assets/css/site.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,172 @@
footer .logo {
height:50px;
margin:0 5px;
padding: 5px 10px;
background: #fff;
border-radius: 5px;
border: solid 1px #007bff;
html,
body,
.view {
height: 100%;
}

body {
padding-top: 45px
}

body.modal-open {
overflow: hidden;
}

.navbar {
min-height: 15px;
transition: top 0.5s ease !important;
}

.navbar-hide {
top: -56px;
}

.navbar-brand {
padding: 0 5px;
}

.navbar.scrolling-navbar,
.navbar.scrolling-navbar.top-nav-collapse {
padding: 0;
}

.page-footer {
background-color: #929FBA;
}

.footer-thumb {
max-height: 60px;
margin: 0 8px;
}

@keyframes waver {
0% {
border-radius: 2px;
}
100% {
border-radius: 20px;
}
}

.loading {
text-align: center;
font-size: 0.8em;
background: #e9e9e9;
position: relative;
opacity: 0.5;
height: 600px;
}

.loader,
.loader::before,
.loader::after {
width: 40px;
height: 40px;
border-radius: 50%;
border: solid 3px transparent;
}

.loader {
border-bottom-color: #35008b;
margin: auto;
margin-bottom: 10px;
text-align: center;
animation: waver 1s infinite alternate ease-in-out;
position: relative;
}

.loader::before,
.loader::after {
content: '';
display: block;
position: absolute;
}

.loader::before {
border-bottom-color: #35008b;
left: -28px;
top: -3px;
animation: waver 1s infinite alternate ease-in-out;
}

.loader::after {
border-bottom-color: #35008b;
left: 23px;
top: -3px;
animation: waver 1s infinite alternate ease-in-out;
}

.ts-plot-container {
height: 12vmax;
min-height: 200px;
}

.card.h300 {
height: 300px;
}

.card.h500 {
height: 500px;
}

.modal .h300 {
max-height: 300px;
}

.min-vh-50 {
min-height: 50vh !important;
}

.min-vh-25 {
min-height: 25vh !important;
}

.vh-50 {
height: 50vh !important;
}

.vh-25 {
height: 25vh !important;
}

.mt-10p {
margin-top: 10% !important;
}

.mt-20p {
margin-top: 20% !important;
}

table.table-sm td,
table.table-sm th {
padding-top: .4rem;
padding-bottom: .4rem;
}

.spinner-center {
position: absolute;
top: 50%;
}

#mosaic {
height: auto;
}

#mosaic-loading {
cursor: wait;
}

#mosaic-loading .spinner-border {
width: 3rem;
height: 3rem;
}

#image-tab {
overflow-x: auto
}

div.scale-bar {
background: black;
width: 34px;
height: 5px;
}
Loading

0 comments on commit e7c2191

Please sign in to comment.