diff --git a/deploy/mongodb/init.sh b/deploy/mongodb/init.sh new file mode 100644 index 0000000..740e454 --- /dev/null +++ b/deploy/mongodb/init.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e +echo 'Initializing a fresh instance' +mongo < /Hawkeye/server/passwd' +directory=/tmp +startsecs=0 +stopwaitsecs=0 +autostart=true +autorestart=false +priority=100 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9ec3e15 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,35 @@ +version: '3' + +services: + mongodb: + image: mongo + restart: always + expose: + - "27017" + environment: + ROOT_USERNAME: hawkeye + ROOT_PASSWORD: hawkeye + MONGO_INITDB_DATABASE: hawkeye + volumes: + - mongodb-data:/data/db + - "./deploy/mongodb/init.sh:/docker-entrypoint-initdb.d/hawkeye.sh" + + hawkeye: + image: daocloud.io/0xbug/hawkeye + build: . + depends_on: + - mongodb + ports: + - 8001:80 + environment: + WEB_USERNAME: admin + WEB_PASSWORD: hawkeye + MONGODB_URI: mongodb://hawkeye:hawkeye@mongodb:27017/hawkeye + MONGODB_USER: hawkeye + MONGODB_PASSWORD: hawkeye + links: + - mongodb + +volumes: + mongodb-data: + driver: local