20 Commits

Author SHA1 Message Date
Linus Groh
310170525d Add CHANGELOG.md 2019-10-26 18:32:02 +01:00
Linus Groh
ed2118339d Use absolute URLs for images for Docker Hub 2019-09-24 19:46:30 +01:00
Linus Groh
d06a87f874 Merge pull request #11 from sharkoz/patch-1
Enable compression for faster download of history
2019-09-24 19:43:56 +01:00
sharkoz
959d71fccd Update README.md 2019-09-24 20:37:31 +02:00
sharkoz
845a2a25ed markdown syntax for image
Hoping it makes it visible on docker hub
2019-09-24 19:56:18 +02:00
sharkoz
088a36e585 Enable compression for faster download of history 2019-09-24 19:38:40 +02:00
Linus Groh
6dc1cd67fd Add Docker Hub pulls badge 2019-09-24 13:09:00 +01:00
Linus Groh
6f687f07e4 Update Docker instructions in README.md 2019-09-24 12:53:46 +01:00
Linus Groh
f467eb48a6 Docker install (#7)
Add Dockerfile to support usage via Docker. Upload images on Dockerhub.
2019-09-24 12:51:42 +01:00
sharkoz
4fca3d4cd7 Update Dockerfile 2019-09-16 16:52:17 +02:00
sharkoz
f6eb70c408 Update nginx.tmpl
Co-Authored-By: Linus Groh <mail@linusgroh.de>
2019-09-03 21:37:47 +02:00
sharkoz
1008d99144 Update nginx.tmpl
Co-Authored-By: Linus Groh <mail@linusgroh.de>
2019-09-03 21:37:37 +02:00
sharkoz
95d8200338 remove useless command 2019-09-03 20:55:26 +02:00
Linus Groh
4c45387ea3 Now official (#8)
Remove disclaimer from README.md after project was transferred to the owntracks organisation
2019-09-03 17:20:22 +01:00
JP Mens
b98203707b Now official 2019-09-03 18:08:51 +02:00
sharkoz
8b19d2bc63 Update README.md 2019-09-03 16:15:32 +02:00
sharkoz
00bb4e7fa7 Apply suggestions from code review
Co-Authored-By: Linus Groh <mail@linusgroh.de>
2019-09-03 14:33:38 +02:00
SharkoZ
2ec596e09a update readme for docker install 2019-09-03 10:53:32 +02:00
SharkoZ
6c58bb2bc8 fix nginx mime types 2019-09-03 09:00:26 +02:00
SharkoZ
cbcb25a25c Dockerise app 2019-09-03 08:57:13 +02:00
4 changed files with 88 additions and 9 deletions

9
CHANGELOG.md Normal file
View File

@@ -0,0 +1,9 @@
# 1.1.0 (2019-10-26)
- Add support for Docker. [#7](https://github.com/owntracks/frontend/pull/7), [@sharkoz](https://github.com/sharkoz)
- Move project to the OwnTracks organisation on GitHub. [#8](https://github.com/owntracks/frontend/pull/8), [@jpmens](https://github.com/jpmens)
- Enable compression in nginx configuration used in Docker image. [#11](https://github.com/owntracks/frontend/pull/11), [@sharkoz](https://github.com/sharkoz)
# 1.0.0 (2019-06-18)
- Initial release

11
Dockerfile Normal file
View File

@@ -0,0 +1,11 @@
FROM nginx:alpine
EXPOSE 80
ENV LISTEN_PORT=80 \
SERVER_HOST=otrecorder \
SERVER_PORT=80
COPY nginx.tmpl /etc/nginx/nginx.tmpl
COPY index.html /usr/share/nginx/html
COPY static/ /usr/share/nginx/html/static/
CMD /bin/sh -c "envsubst '\${SERVER_HOST} \${SERVER_PORT} \${LISTEN_PORT}' < /etc/nginx/nginx.tmpl > /etc/nginx/nginx.conf && nginx -g 'daemon off;' || ( env; cat /etc/nginx/nginx.conf )"

View File

@@ -2,20 +2,45 @@
> A modern web interface for OwnTracks made with Vue.js
[![Docker Pulls](https://img.shields.io/docker/pulls/owntracks/frontend)](https://hub.docker.com/r/owntracks/frontend)
<p style="text-align: center;">
<img src="docs/images/owntracks-ui.png" alt="OwnTracks UI">
<img src="https://raw.githubusercontent.com/owntracks/frontend/master/docs/images/owntracks-ui.png" alt="OwnTracks UI">
</p>
## Introduction
This is a web interface for [OwnTracks](https://github.com/owntracks/recorder), intended to replace the various web pages shipping with the recorder. OwnTracks UI uses Vue.js under the hood.
*This is not an official OwnTracks project.*
## Installation
### Manual install
Clone the repository and copy `index.html` and the `static/` directory to your server's webroot. The API is expected to be reachable under the same domain as the web interface.
### Docker
You can launch directly via Docker run like this:
```console
$ docker run -d -p 80:80 -e SERVER_HOST=otrecorder-host -e SERVER_PORT=otrecorder-port owntracks/frontend
```
Or you can use `docker-compose` (if you also run the OwnTracks Recorder with the default compose config, and the service is named `otrecorder`):
```yaml
version: '3'
services:
owntracks-ui:
image: owntracks/frontend
ports:
- 80:80
environment:
- SERVER_HOST=otrecorder
- SERVER_PORT=8083
restart: unless-stopped
```
## Features
- Enable or disable multiple layers:
@@ -47,11 +72,11 @@ Clone the repository and copy `index.html` and the `static/` directory to your s
_Click to enlarge._
<a href="docs/images/live.png" target="_blank"><img src="docs/images/live.png" alt="Live" height="200"></a>
<a href="docs/images/multiple.png" target="_blank"><img src="docs/images/multiple.png" alt="Multiple" height="200"></a>
<a href="docs/images/date-selection.png" target="_blank"><img src="docs/images/date-selection.png" alt="Date selection" height="200"></a>
<a href="docs/images/heatmap.png" target="_blank"><img src="docs/images/heatmap.png" alt="Heatmap" height="200"></a>
<a href="docs/images/customized.png" target="_blank"><img src="docs/images/customized.png" alt="Customized" height="200"></a>
<a href="https://raw.githubusercontent.com/owntracks/frontend/master/docs/images/live.png" target="_blank"><img src="https://raw.githubusercontent.com/owntracks/frontend/master/docs/images/live.png" alt="Live" height="200"></a>
<a href="https://raw.githubusercontent.com/owntracks/frontend/master/docs/images/multiple.png" target="_blank"><img src="https://raw.githubusercontent.com/owntracks/frontend/master/docs/images/multiple.png" alt="Multiple" height="200"></a>
<a href="https://raw.githubusercontent.com/owntracks/frontend/master/docs/images/date-selection.png" target="_blank"><img src="https://raw.githubusercontent.com/owntracks/frontend/master/docs/images/date-selection.png" alt="Date selection" height="200"></a>
<a href="https://raw.githubusercontent.com/owntracks/frontend/master/docs/images/heatmap.png" target="_blank"><img src="https://raw.githubusercontent.com/owntracks/frontend/master/docs/images/heatmap.png" alt="Heatmap" height="200"></a>
<a href="https://raw.githubusercontent.com/owntracks/frontend/master/docs/images/customized.png" target="_blank"><img src="https://raw.githubusercontent.com/owntracks/frontend/master/docs/images/customized.png" alt="Customized" height="200"></a>
## ToDo
@@ -63,7 +88,6 @@ _Click to enlarge._
- Dependency management with yarn instead of a local copy or unpkg.com
- Add documentation, at least for the config file
- Docker support
- Download data for selected date range, user and device as JSON
## Contributing

35
nginx.tmpl Normal file
View File

@@ -0,0 +1,35 @@
worker_processes 1;
events {
worker_connections 1024;
}
http {
upstream otrecorder {
server ${SERVER_HOST}:${SERVER_PORT};
}
server {
listen ${LISTEN_PORT};
root /usr/share/nginx/html;
location /api {
proxy_pass http://otrecorder/api/;
}
location /ws {
proxy_pass http://otrecorder/ws/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
}
location / {
include /etc/nginx/mime.types;
try_files $uri $uri/index.html;
}
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/javascript;
}
}