Skip to content

feat: add tmux to base image and auto-launch it#2115

Draft
hunleyd wants to merge 6 commits intodevelopfrom
INDATA-574
Draft

feat: add tmux to base image and auto-launch it#2115
hunleyd wants to merge 6 commits intodevelopfrom
INDATA-574

Conversation

@hunleyd
Copy link
Copy Markdown
Contributor

@hunleyd hunleyd commented Apr 15, 2026

Overview

This pull request introduces a standardized tmux configuration and automated session management for the Supabase infrastructure. It aims to improve operator productivity through a persistent, feature-rich terminal environment while enhancing security via automated shell timeouts.

Technical Changes

  • New Task: tasks/setup-tmux.yml

    • Installs the tmux package via apt.
    • Session Hardening: Implements a 10-minute idle timeout for all shells by creating /etc/profile.d/11-shell_timeout.sh (TMOUT=600).
    • Global Configuration: Deploys a customized /etc/tmux.conf to ensure a consistent environment for all users.
    • Auto-Invocation: Configures interactive shells to automatically launch tmux via /etc/profile.d/12-tmux.sh, ensuring persistence across accidental disconnections.
  • New Template: files/tmux.conf.j2

    • Dual Prefixes: Enables both Ctrl-b (default) and Ctrl-a (common preference) for command invocation.
    • Intuitive Navigation: Adds | and - for vertical and horizontal splits, and Alt+Arrow keys for seamless pane switching.
    • Modern UX: Enables mouse support for pane resizing and selection.
    • Aesthetics: Customizes the status bar, pane borders, and clock mode for high visibility.
  • Playbook Integration

    • Registered the new Install tmux task in playbook.yml, positioned after system tuning and before database setup.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a standardized tmux setup to the Ansible-built base image, including global tmux configuration and shell profile hooks intended to enforce idle timeouts and auto-launch tmux for operators.

Changes:

  • Introduces a new Ansible task file to install tmux and drop /etc/profile.d scripts for TMOUT + tmux auto-start.
  • Adds a global /etc/tmux.conf template to standardize keybindings and UI settings.
  • Wires the tmux setup tasks into the main ansible/playbook.yml.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
ansible/tasks/setup-tmux.yml Installs tmux and deploys shell timeout + tmux auto-launch profile scripts plus tmux config.
ansible/playbook.yml Imports the new tmux setup tasks into the main provisioning flow.
ansible/files/tmux.conf.j2 Provides the global tmux configuration deployed to /etc/tmux.conf.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ansible/tasks/setup-tmux.yml Outdated
Comment thread ansible/tasks/setup-tmux.yml
Comment thread ansible/tasks/setup-tmux.yml
hunleyd and others added 3 commits April 15, 2026 11:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…-574

* 'INDATA-574' of github.com:supabase/postgres:
  Update ansible/tasks/setup-tmux.yml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ansible/tasks/setup-tmux.yml Outdated
Comment thread ansible/tasks/setup-tmux.yml Outdated
Comment thread ansible/tasks/setup-tmux.yml Outdated
Comment thread ansible/tasks/setup-tmux.yml Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ansible/tasks/setup-tmux.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants