1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-24 05:17:06 +02:00
dockerfiles/influxdb/README.md
2016-05-24 11:29:59 +08:00

44 lines
933 B
Markdown

influxdb
========
> :warning: Please use the official image [influxdb](https://hub.docker.com/_/influxdb/)!
[InfluxDB][1] is an open source distributed time series database with no external
dependencies. It's useful for recording metrics, events, and performing
analytics.
## docker-compose.yml
```yaml
influxdb:
image: influxdb:alpine
ports:
- "8083:8083"
- "8086:8086"
volumes:
- ./data:/var/lib/influxdb
restart: always
```
```yaml
influxdb:
image: vimagick/influxdb
ports:
- "8083:8083"
- "8086:8086"
- "8088:8088"
- "25826:25826/udp"
restart: always
```
## up and running
- Open url: <http://localhost:8083>
- Create user: `CREATE USER "username" WITH PASSWORD 'password'`
- Create database: `CREATE DATABASE "db_name"`
- Select database: `db_name`
- Write data: `INSERT cpu,host=serverA,region=us_west value=0.64`
- Query data: `SELECT * FROM cpu`
[1]: https://influxdata.com/