Skip to content

Instantly share code, notes, and snippets.

View StanlyShauro's full-sized avatar

Stanley Shauto StanlyShauro

View GitHub Profile
@StanlyShauro
StanlyShauro / docker-compose.yml
Created December 27, 2023 03:34 — forked from MichalAdorno/docker-compose.yml
docker-compose Postgres health-check
version: "3"
services:
postgress:
....
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
app:
@StanlyShauro
StanlyShauro / read-access.sql
Last active August 11, 2018 07:40 — forked from oinopion/read-access.sql
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
# 3. Clear 'Processed' and 'Failed' jobs