- At least go 1.11 with the env var
GO111MODULEs=on
docker
anddocker-compose
are available and up-to-date
In different terminal windows:
- Start
kafka
anddgraph
withdocker-compose up
- Run the scraper with
go run scraper/main/main.go
- Run the dgraph inserter with
go run dgraph-inserter/main/main.go
- Run the postgres inserter with
go run postgres-inserter/main/main.go
If this is your first time running this:
- Set the schema for DGraph with
go run db/reset/main.go
- install migrate with
brew install golang-migrate
(on mac) - create the database in postgres with
psql -h localhost -U postgres -w -c "create database instascraper;"
- run the migrations with
migrate -database 'postgres://postgres:password@localhost:5432/instascraper?sslmode=disable' -path db/migrations up
- Choose a user_name as a starting point and run
go run cli/main/main.go <user_name>
docker build -t instascraper_scraper -f scraper/Dockerfile .
docker build -t instascraper_dgraph_inserter -f dgraph-inserter/Dockerfile .
docker build -t instascraper_postgres_inserter -f postgres-inserter/Dockerfile .