Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
724f2c68
Commit
724f2c68
authored
8 years ago
by
furion
Browse files
Options
Downloads
Patches
Plain Diff
dockerize dev environment
parent
58e2ec2b
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+10
-4
10 additions, 4 deletions
Makefile
README.md
+15
-0
15 additions, 0 deletions
README.md
docker-compose.yml
+10
-1
10 additions, 1 deletion
docker-compose.yml
scripts/schema.py
+1
-1
1 addition, 1 deletion
scripts/schema.py
with
36 additions
and
6 deletions
Makefile
+
10
−
4
View file @
724f2c68
...
...
@@ -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
.
This diff is collapsed.
Click to expand it.
README.md
+
15
−
0
View file @
724f2c68
## 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.
...
...
This diff is collapsed.
Click to expand it.
scripts/
docker-compose.yml
→
docker-compose.yml
+
10
−
1
View file @
724f2c68
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
This diff is collapsed.
Click to expand it.
scripts/schema.py
+
1
−
1
View file @
724f2c68
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment