Making jubilee match up with the updated go weather
This commit is contained in:
parent
6c3a20078e
commit
728ed04317
25
Docker/dev/Dockerfile
Normal file
25
Docker/dev/Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
FROM git.caliban.io/martin/node-python:8
|
||||
#FROM martind2000/node-python3:18
|
||||
ARG VERSION
|
||||
ENV VERSION ${VERSION:-development}
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./Docker/start.sh ./package*.json ./server.js ./gulpfile.js ./mongo.yml ./ecosystem.json /app/
|
||||
|
||||
RUN mkdir -p /app/src /app/fonts /app/gulp /app/server /app/tools
|
||||
|
||||
# COPY ./src /app/src
|
||||
|
||||
# COPY ./types /app/types
|
||||
|
||||
RUN set -x \
|
||||
&& npm install \
|
||||
&& npm install -g gulp pm2
|
||||
|
||||
RUN chmod +x /app/start.sh
|
||||
|
||||
EXPOSE 8110
|
||||
|
||||
|
||||
ENTRYPOINT ["/app/start.sh"]
|
9
Docker/start.sh
Normal file
9
Docker/start.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
# npm run dev
|
||||
|
||||
# npm run start
|
||||
|
||||
|
||||
while true; do sleep infinity; done
|
26
docker-compose.yml
Normal file
26
docker-compose.yml
Normal file
@ -0,0 +1,26 @@
|
||||
version: '3.5'
|
||||
|
||||
services:
|
||||
jubilee-src:
|
||||
container_name: jubilee-src
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Docker/dev/Dockerfile
|
||||
image: jubilee-src
|
||||
logging:
|
||||
options:
|
||||
max-size: '1m'
|
||||
max-file: '5'
|
||||
# restart: always
|
||||
# env_file:
|
||||
# - .env
|
||||
|
||||
ports:
|
||||
- '8110:8110'
|
||||
volumes:
|
||||
- ./src:/app/src
|
||||
- ./gulp:/app/gulp
|
||||
- ./server:/app/server
|
||||
- ./tools:/app/tools
|
||||
- ./fonts:/app/fonts
|
||||
- ./live:/app/live
|
@ -8,8 +8,8 @@
|
||||
{
|
||||
"name": "Jubilee",
|
||||
"script": "server.js",
|
||||
"cwd": "/home/martind2000/dev/jubilee",
|
||||
"watch": false,
|
||||
"cwd": ".",
|
||||
"watch": true,
|
||||
"ignore_watch" : ["node_modules"],
|
||||
"merge_logs" : true,
|
||||
"autorestart" : true,
|
||||
|
18
package.json
18
package.json
@ -3,8 +3,17 @@
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"watch": {
|
||||
"gulp" : "{src,server}/*.js",
|
||||
"server": "server/**/*.js"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
"gulp": "gulp default",
|
||||
"server": "node server.js",
|
||||
"watch-gulp": "npm-watch gulp",
|
||||
"watch-server": "npm-watch server",
|
||||
"start-watching": "npm run watch-gulp && npm run-watch-server",
|
||||
"start": "npm run watch-server"
|
||||
},
|
||||
"engines": {
|
||||
"node": "=8.17.0"
|
||||
@ -64,6 +73,7 @@
|
||||
"yelp-fusion": "^2.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^8.2.2",
|
||||
"expect.js": "^0.3.1",
|
||||
"gulp": "3.9.1",
|
||||
"gulp-google-webfonts": "0.0.14",
|
||||
@ -77,6 +87,9 @@
|
||||
"mocha": "^5.2.0",
|
||||
"node-fetch": "^2.3.0",
|
||||
"node-geocoder": "^3.22.0",
|
||||
"nodemon": "^3.0.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"npm-watch": "^0.11.0",
|
||||
"require-dir": "^1.2.0",
|
||||
"requirejs": "^2.3.6",
|
||||
"sinon": "^4.5.0",
|
||||
@ -84,7 +97,10 @@
|
||||
"tape-promise": "^4.0.0",
|
||||
"vinyl-buffer": "^1.0.1",
|
||||
"vinyl-source-stream": "^2.0.0",
|
||||
"watch": "^1.0.2",
|
||||
"watchify": "^3.11.0",
|
||||
"whatwg-fetch": "^2.0.4"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -432,14 +432,9 @@ function processICAL(ical) {
|
||||
'https://calendar.google.com/calendar/embed?src=family18216414236505453132%40group.calendar.google.com&ctz=Europe%2FLondon']
|
||||
*/
|
||||
module.exports = {
|
||||
'calendars': ['https://calendar.google.com/calendar/ical/martind2000%40gmail.com/private-40cfebc9f7dcfa7fde6b9bf2f0092c93/basic.ics',
|
||||
'https://calendar.google.com/calendar/ical/mt5pgdhknvgoc8usfnrso9vkv0%40group.calendar.google.com/private-58876002af9f302a593acfa6fa792dcf/basic.ics',
|
||||
'https://www.tripit.com/feed/ical/private/DB96E4BB-94A9BD8F9CC1CF51C6CC0D920840F4F5/tripit.ics',
|
||||
'https://calendar.google.com/calendar/ical/en.uk%23holiday%40group.v.calendar.google.com/public/basic.ics',
|
||||
'https://calendar.google.com/calendar/ical/i8dglj12p5nuv20sbjmun5s588%40group.calendar.google.com/private-c8adccb41e56d6a2f285078aaed313f5/basic.ics',
|
||||
'https://calendar.google.com/calendar/ical/qppj4ebvdur1qui4v0fdpl7l70%40group.calendar.google.com/private-b5071cb2c3fe49544ffbbd08645088f1/basic.ics',
|
||||
'https://calendar.google.com/calendar/ical/8h3vi3rd5rvpfe11klvgre0q4c%40group.calendar.google.com/private-e9df93163a7046658946be45fb08db6f/basic.ics',
|
||||
'https://calendar.google.com/calendar/embed?src=family18216414236505453132%40group.calendar.google.com&ctz=Europe%2FLondon'],
|
||||
'calendars': ['https://cloud.caliban.io/index.php/apps/calendar/p/EKtowxdMkFz6fzfN',
|
||||
'https://cloud.caliban.io/index.php/apps/calendar/p/WBSNSyLrk9ZmB2w5',
|
||||
'https://cloud.caliban.io/index.php/apps/calendar/p/KcK6B42rAePnrrW4'],
|
||||
'jsonBlock': [],
|
||||
'getTodaysSimple': function() {
|
||||
'use strict';
|
||||
|
@ -1,3 +1,4 @@
|
||||
//
|
||||
const $ = require('jquery');
|
||||
const _ = require('underscore');
|
||||
const Backbone = require('backbone');
|
||||
|
@ -37,7 +37,7 @@ function reduceOpenWeather(item, city) {
|
||||
// Replaced Moment with Fecha.
|
||||
// Too many issues trying to get Moment packaged into the bundle.
|
||||
|
||||
if (!item || item === null) return {};
|
||||
if (!item) return {};
|
||||
const fts = new Date(item.dt * 1000);
|
||||
const weatherBlock = item.weather[0];
|
||||
|
||||
@ -45,9 +45,9 @@ function reduceOpenWeather(item, city) {
|
||||
'timestamp': item.dt,
|
||||
'icon': `wi-owm-${weatherBlock.id}`,
|
||||
'summary': weatherBlock.description,
|
||||
'temp': parseInt(item.main.temp, 10),
|
||||
'tempHigh': parseFloat(item.main.temp_max, 10),
|
||||
'tempLow': parseFloat(item.main.temp_min, 10),
|
||||
'temp': parseInt(item.temp['day'], 10),
|
||||
'tempHigh': parseFloat(item.temp['max'], 10),
|
||||
'tempLow': parseFloat(item.temp['min'], 10),
|
||||
'datelong': fecha.format(fts, 'YYYY-MM-DDTHH:mm:ss.SSSZZ'),
|
||||
'readdate': fecha.format(fts, 'default'),
|
||||
'time': item.dt,
|
||||
|
Loading…
Reference in New Issue
Block a user