summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--docker-compose.yml36
-rwxr-xr-xpsql.sh4
3 files changed, 45 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..327b408
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,5 @@
+build:
+ docker build . -t tracker
+
+start:
+ docker-compose up -d
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..ee1518d
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,36 @@
+version: "3"
+services:
+ db:
+ image: postgres
+ restart: always
+ environment:
+ POSTGRES_PASSWORD: password
+ POSTGRES_USER: tracking
+ POSTGRES_DB: tracking
+ volumes:
+ - db_data:/var/lib/postgresql/data
+ server:
+ image: tracker
+ restart: always
+ depends_on:
+ - db
+ ports:
+ - 60934:8000
+ environment:
+ PYTHONUNBUFFERED: 1
+ grafana:
+ image: grafana/grafana
+ restart: always
+ depends_on:
+ - db
+ ports:
+ - 3000:3000
+ environment:
+ GF_SERVER_ROOT_URL: "https://tracker.marks.kitchen"
+ volumes:
+ - grafana-data:/var/lib/grafana
+
+volumes:
+ db_data:
+ grafana-data:
+
diff --git a/psql.sh b/psql.sh
new file mode 100755
index 0000000..c4a6da6
--- /dev/null
+++ b/psql.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+sudo docker exec -it tracker_db_1 psql -U tracking -d tracking
+