Skip to content
Snippets Groups Projects
Commit 724f2c68 authored by furion's avatar furion
Browse files

dockerize dev environment

parent 58e2ec2b
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ ROOT_DIR := $(shell pwd)
PROJECT_NAME := hive
PROJECT_DOCKER_TAG := steemit/$(PROJECT_NAME)
PROJECT_DOCKER_RUN_ARGS := -p8080:8080
PROJECT_DOCKER_RUN_ARGS := --link steemit_mysql:db
default: build
......@@ -13,10 +13,16 @@ build:
docker build -t $(PROJECT_DOCKER_TAG) .
run:
docker run $(PROJECT_DOCKER_RUN_ARGS) $(PROJECT_DOCKER_TAG)
docker run -it $(PROJECT_DOCKER_RUN_ARGS) $(PROJECT_DOCKER_TAG) /bin/bash
compose:
docker-compose up -d
mysql:
docker run -d --name steemit_mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root_password -e MYSQL_DATABASE=testdb mysql
ipython:
docker run -it $(PROJECT_DOCKER_TAG) ipython
docker run -it $(PROJECT_DOCKER_RUN_ARGS) $(PROJECT_DOCKER_TAG) ipython
test: test-without-build build
......@@ -47,4 +53,4 @@ clean-pyc:
find . -name '*~' -exec rm -f {} +
install: clean
pip install -e .
\ No newline at end of file
pip install -e .
## Dev Environment
Prepare MySQL Database (once):
```
make mysql
```
Prepare and load REPL (on change):
```
make build
make iypthon
```
## Hivemind
`hivemind` is an off-chain consensus layer for Steem communities and API server for social features like feeds and follows.
It is primarily concerned with indexing specific `custom_json` namespaces but also watches for posts, votes, and account creations.
......
version: '2'
version: '3'
services:
mysql:
image: mysql
......@@ -26,3 +26,12 @@ services:
- 8080:80
volumes:
- /sessions
# hive:
# build:
# context: .
# dockerfile: Dockerfile
# command: python run.py
# container_name: hive-python
# links:
# - mysql:db
# restart: always
......@@ -6,7 +6,7 @@ from sqlalchemy.dialects.mysql import (
TINYTEXT, DOUBLE,
)
connection_url = 'mysql://root:root_password@localhost:3306/testdb'
connection_url = 'mysql://root:root_password@db:3306/testdb'
logging.basicConfig()
logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment