Skip to content

Instantly share code, notes, and snippets.

🐳
gopher in training

Ivor Scott ivorscott

🐳
gopher in training
Block or report user

Report or block ivorscott

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View create products table
docker-compose run migration create_products_table
View add tags to products
docker-compose run migration add_tags_to_products
View hey requests
hey -c 10 -n 2000 https://localhost:4000/v1/products
View go tool pprof
go tool pprof http://localhost:6060/debug/pprof/profile\?seconds\=10
View dlv connect
docker-compose exec debug-api dlv connect localhost:2345
View create seed file
touch ./api/internal/schema/seeds/products.sql
View insert seed data
docker-compose exec db psql postgres postgres -f /seed/products.sql
View partial.yml
volumes:
- postgres:/var/lib/postgresql/data
- ./api/scripts/:/docker-entrypoint-initdb.d/
View gist:f81ddc73dd9bb1a5069cc7d9e3e5cd49
dump:
@echo [ dumping postgres backup for $(POSTGRES_DB)... ]
@docker exec -it db pg_dump --username $(POSTGRES_USER) $(POSTGRES_DB) > ./api/scripts/backup.sql
@echo $(SUCCESS)
View build test target
docker build --target test --tag demo/client:test ./client
docker build --target test --tag demo/api:test ./api
You can’t perform that action at this time.