Skip to content

Commit e7c2191

Browse files
authored
Merge pull request #71 from WHOIGit/dev
merge a1 into master
2 parents 7cd33c5 + 968f89d commit e7c2191

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+32214
-217
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,6 @@ pyifcb
116116
pg_data
117117
ifcb_data
118118
static
119+
120+
.DS_Store
121+
.vscode

Dockerfile

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
from continuumio/miniconda3
1+
from continuumio/miniconda3:4.5.12
22

33
RUN apt-get update
44

5+
# geospatial libraries
6+
RUN apt-get install -y binutils libproj-dev gdal-bin
7+
58
# nomkl to reduce image size (mkl is large)
69
RUN conda install nomkl
710

8-
# gunicorn to run the WSGI app
9-
RUN conda install gunicorn
10-
1111
# install pyifcb and ifcbdb dependencies first
1212
# pyifcb must be cloned into the same directory as this dockerfile
1313

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

2626
# this application
2727

28+
RUN conda install gunicorn=19.9.0
29+
2830
EXPOSE 8000
2931

3032
# descend into app directory

bin/assets.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
docker exec -it ifcbdb python manage.py collectstatic --no-input

bin/clearcache.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
docker exec -it ifcbdb python manage.py clearcache

bin/migrate.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
docker exec -it ifcbdb python manage.py migrate

bin/pshell.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
docker exec -it ifcbdb python manage.py shell
4+

bin/psql.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
docker exec -it postgres psql -U ifcb -W
4+

bin/shell.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
docker exec -it ifcbdb bash
4+

docker-compose.yml

+40-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,32 @@ services:
1212
networks:
1313
- nginx_network
1414
- postgres_network
15+
- memcached_network
16+
- redis_network
1517
depends_on:
1618
- postgres
19+
- memcached
20+
- redis
21+
22+
celery:
23+
build: .
24+
container_name: celery
25+
command: celery -A ifcbdb worker -l info
26+
volumes:
27+
- ./pyifcb:/pyifcb
28+
- ./ifcbdb:/ifcbdb
29+
- ./ifcb_data:/data
30+
depends_on:
31+
- postgres
32+
- memcached
33+
- redis
34+
networks:
35+
- redis_network
36+
- postgres_network
37+
- memcached_network
1738

1839
nginx:
19-
image: nginx:latest
40+
image: nginx:1.15
2041
container_name: nginx
2142
ports:
2243
- 8000:80
@@ -29,7 +50,7 @@ services:
2950
- nginx_network
3051

3152
postgres:
32-
image: mdillon/postgis
53+
image: mdillon/postgis:11-alpine
3354
container_name: postgres
3455
environment:
3556
- POSTGRES_USER=ifcb
@@ -40,8 +61,25 @@ services:
4061
networks:
4162
- postgres_network
4263

64+
memcached:
65+
image: memcached:1.5.12-alpine
66+
container_name: memcached
67+
command: ["-m", "64m"]
68+
networks:
69+
- memcached_network
70+
71+
redis:
72+
image: redis:5.0.4-alpine
73+
container_name: redis
74+
networks:
75+
- redis_network
76+
4377
networks:
4478
nginx_network:
4579
driver: bridge
4680
postgres_network:
4781
driver: bridge
82+
memcached_network:
83+
driver: bridge
84+
redis_network:
85+
driver: bridge

environment.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
name: ifcbdb
2+
channels:
3+
- conda-forge
24
dependencies:
3-
- python>=3.7
4-
- django
5-
- psycopg2
5+
- python=3.6
6+
- django=2.1.7
7+
- psycopg2=2.7.6.1
8+
- pycrypto=2.6.1
9+
- pip=19.0.3
10+
- kombu=4.1.0
11+
- celery=4.1.0
12+
- gdal=2.4.0
13+
- libiconv=1.15
14+
- pip:
15+
- python-memcached==1.59
16+
- redis==2.10.6

ifcbdb/assets/css/site.css

+170-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,172 @@
1-
footer .logo {
2-
height:50px;
3-
margin:0 5px;
4-
padding: 5px 10px;
5-
background: #fff;
6-
border-radius: 5px;
7-
border: solid 1px #007bff;
1+
html,
2+
body,
3+
.view {
4+
height: 100%;
85
}
6+
7+
body {
8+
padding-top: 45px
9+
}
10+
11+
body.modal-open {
12+
overflow: hidden;
13+
}
14+
15+
.navbar {
16+
min-height: 15px;
17+
transition: top 0.5s ease !important;
18+
}
19+
20+
.navbar-hide {
21+
top: -56px;
22+
}
23+
24+
.navbar-brand {
25+
padding: 0 5px;
26+
}
27+
28+
.navbar.scrolling-navbar,
29+
.navbar.scrolling-navbar.top-nav-collapse {
30+
padding: 0;
31+
}
32+
33+
.page-footer {
34+
background-color: #929FBA;
35+
}
36+
37+
.footer-thumb {
38+
max-height: 60px;
39+
margin: 0 8px;
40+
}
41+
42+
@keyframes waver {
43+
0% {
44+
border-radius: 2px;
45+
}
46+
100% {
47+
border-radius: 20px;
48+
}
49+
}
50+
51+
.loading {
52+
text-align: center;
53+
font-size: 0.8em;
54+
background: #e9e9e9;
55+
position: relative;
56+
opacity: 0.5;
57+
height: 600px;
58+
}
59+
60+
.loader,
61+
.loader::before,
62+
.loader::after {
63+
width: 40px;
64+
height: 40px;
65+
border-radius: 50%;
66+
border: solid 3px transparent;
67+
}
68+
69+
.loader {
70+
border-bottom-color: #35008b;
71+
margin: auto;
72+
margin-bottom: 10px;
73+
text-align: center;
74+
animation: waver 1s infinite alternate ease-in-out;
75+
position: relative;
76+
}
77+
78+
.loader::before,
79+
.loader::after {
80+
content: '';
81+
display: block;
82+
position: absolute;
83+
}
84+
85+
.loader::before {
86+
border-bottom-color: #35008b;
87+
left: -28px;
88+
top: -3px;
89+
animation: waver 1s infinite alternate ease-in-out;
90+
}
91+
92+
.loader::after {
93+
border-bottom-color: #35008b;
94+
left: 23px;
95+
top: -3px;
96+
animation: waver 1s infinite alternate ease-in-out;
97+
}
98+
99+
.ts-plot-container {
100+
height: 12vmax;
101+
min-height: 200px;
102+
}
103+
104+
.card.h300 {
105+
height: 300px;
106+
}
107+
108+
.card.h500 {
109+
height: 500px;
110+
}
111+
112+
.modal .h300 {
113+
max-height: 300px;
114+
}
115+
116+
.min-vh-50 {
117+
min-height: 50vh !important;
118+
}
119+
120+
.min-vh-25 {
121+
min-height: 25vh !important;
122+
}
123+
124+
.vh-50 {
125+
height: 50vh !important;
126+
}
127+
128+
.vh-25 {
129+
height: 25vh !important;
130+
}
131+
132+
.mt-10p {
133+
margin-top: 10% !important;
134+
}
135+
136+
.mt-20p {
137+
margin-top: 20% !important;
138+
}
139+
140+
table.table-sm td,
141+
table.table-sm th {
142+
padding-top: .4rem;
143+
padding-bottom: .4rem;
144+
}
145+
146+
.spinner-center {
147+
position: absolute;
148+
top: 50%;
149+
}
150+
151+
#mosaic {
152+
height: auto;
153+
}
154+
155+
#mosaic-loading {
156+
cursor: wait;
157+
}
158+
159+
#mosaic-loading .spinner-border {
160+
width: 3rem;
161+
height: 3rem;
162+
}
163+
164+
#image-tab {
165+
overflow-x: auto
166+
}
167+
168+
div.scale-bar {
169+
background: black;
170+
width: 34px;
171+
height: 5px;
9172
}

0 commit comments

Comments
 (0)