diff options
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | docker-compose.yml | 36 | ||||
-rwxr-xr-x | psql.sh | 4 |
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: + @@ -0,0 +1,4 @@ +#!/bin/bash + +sudo docker exec -it tracker_db_1 psql -U tracking -d tracking + |