Compare commits
No commits in common. 'main' and 'env-variables-configuration-#55' have entirely different histories.
main
...
env-variab
20 changed files with 104 additions and 277 deletions
@ -1,27 +0,0 @@
|
||||
FROM rust:1.57.0-bullseye as builder |
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - |
||||
|
||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ |
||||
nodejs \ |
||||
gcc \ |
||||
g++ \ |
||||
make \ |
||||
musl-tools \ |
||||
&& rm -rf /var/lib/apt/lists/* |
||||
|
||||
RUN npm install --global yarn |
||||
|
||||
RUN rustup target add x86_64-unknown-linux-musl |
||||
|
||||
ADD . ./ |
||||
|
||||
RUN make |
||||
|
||||
FROM debian:bullseye-slim |
||||
|
||||
COPY --from=builder /release/hastic /hastic |
||||
COPY --from=builder /release/config.toml /config.toml |
||||
COPY --from=builder /release/public /public |
||||
|
||||
CMD ["./hastic"] |
@ -1,12 +0,0 @@
|
||||
|
||||
version: '3' |
||||
services: |
||||
app: |
||||
image: hastic/hastic:latest |
||||
restart: always |
||||
environment: |
||||
HASTIC_PORT: "4347" |
||||
HASTIC_PROMETHEUS__URL: "http://demo.robustperception.io:9090" |
||||
HASTIC_PROMETHEUS__QUERY: "rate(go_memstats_alloc_bytes_total[1m])" |
||||
ports: |
||||
- "4347:4347" |
@ -1,23 +0,0 @@
|
||||
use std::sync::{Arc, Mutex}; |
||||
|
||||
use rusqlite::{Connection}; |
||||
|
||||
|
||||
pub struct DataService { |
||||
pub analytic_units_connection: Arc<Mutex<Connection>>, |
||||
pub segments_connection: Arc<Mutex<Connection>> |
||||
} |
||||
|
||||
impl DataService { |
||||
pub fn new() -> anyhow::Result<DataService> { |
||||
std::fs::create_dir_all("./data").unwrap(); |
||||
|
||||
let analytic_units_connection = Connection::open("./data/analytic_units.db")?; |
||||
let segments_connection = Connection::open("./data/segments.db")?; |
||||
|
||||
Ok(DataService { |
||||
analytic_units_connection: Arc::new(Mutex::new(analytic_units_connection)), |
||||
segments_connection: Arc::new(Mutex::new(segments_connection)) |
||||
}) |
||||
} |
||||
} |
Loading…
Reference in new issue