v0.2.0: Project CRUD, Docker Stack, and instance→server rename#7
Merged
Conversation
- Add project_name to deployments table and wire through API/CLI - Implement `project logs`, `project stop`, `project restart` with WebSocket TUI - Rename `instance list` → `instance ls`, add dimmed row styling for pending instances - Add interactive prompts (huh) for instance init, set-host, and project init/edit - Move preflight/setup/apply/status/logs/restart/upgrade under `instance` subcommand - Overhaul CLI output with lipgloss styling and table rendering - Replace cancelDeploymentHandler with stop + restart handlers - Pass project_name in deploy POST body
…eation, and instance→server rename - Add full projects CRUD (Gett/POST /v1/projects, GET/PUT/DELETE /v1/projects/:id) - Auto-create projects on deploy & upload when project_name is provided - Replace project_name string on deployments with project_id FK to projects table - Refactor deployments model: ProjectName → ProjectID, GetAllForUser uses int64 filter - Add shared isUniqueViolation helper; deduplicate pq error handling from users.go - Add ErrDuplicateProject and pqProjectsNameKey to models.go - Replace migration 000006 (add_project_name) with 000006 (create_projects_table) + 000007 (add_project_id) - Rename CLI instance→server throughout: InstanceConfig→ServerConfig, InstanceCmd→ServerCmd, etc. - Rename config directory from instances/ to servers/ - Add rename-on-edit support for server and project configs - Auto-provision Ansible via uv venv (ensureVenv/installUV) instead of requiring system install - Include SSHIdentityFile in Ansible inventory template - Always re-extract embedded Ansible assets (remove marker check) - Pass --no-tty to preflight during setup for non-interactive CI runs - Add runChecksPlain for non-TUI preflight output - Switch Ansible extra vars from vcs.Version() to vcs.DockerTag() (+→-) - Restructure deploy_user and operator_user ansible vars with groups, sudo, ssh_authorized_keys - Add apiClient.ensureProject() helper; deploy sends project_id alongside project_name - Install uv + Ansible in installer script (install.sh) - Fix typo: connetion→connection
…ndency updates - Swap Docker Compose → Docker Stack in the Ansible deploy playbook - Split compose.yml into stack.data.yml (PostgreSQL, appa_data stack) and stack.base.yml (API/BuildKit/Caddy/UI, appa stack) - Initialize Docker Swarm; detect and clean up legacy Compose - Add resource limits, health checks, start-first update with rollback, and host-mode port publishing - Add CI build workflow (push API + UI images to GHCR on main) - Pin release workflow to ubuntu-24.04; enable BuildKit zstd compression - Add ansible-dev-tools to dev dependencies; update uv.lock - Add Vagrant port forwarding for local testing - Refresh installer colors to match Go TUI palette
style: resolve lint issues and reformat files refactor: rename BaseAPIURL→APIBaseURL chore: remove unused code
- Rename ServerConfig.BaseAPIURL→APIBaseURL (TOML field renamed) - Add APIPort field + --port flag on server set-host; extract apiBaseURL() helper - Fix --host flag on server init (StringVarP→StringVar, avoids -h conflict) - Remove unused: errAnsibleMissing verbose message, logViewerTitle, renderHeader, renderSummary(), getPort(), trailing newlines; fix style chaining & indent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
appa server— all server commands (init,setup,preflight,apply,status,logs,restart,upgrade) are now grouped underappa serverinstead of sitting at the top level.appa project logs(live log viewer),stop,restart,env.--verboseor-vto see full Ansible output.--no-ttyflag lets you run preflight checks without prompts.--portflag onappa server set-hostfor setups like Vagrant that forward a non-standard port.main.appa deploynow prompts for environment variables interactively.Changed
instance→server— this is the big rename. Every command, config file, folder, and internal name now says "server" instead of "instance" (appa instance *becomesappa server *). Configs that were in~/.appa/instances/are now in~/.appa/servers/.base_api_url→api_base_url— the config field has a new name.docker compose up -dapproach is replaced bydocker stack deploy(Swarm mode). If an old Compose stack is running, it's detected and stopped automatically.localhost:8080instead of the default port).uvand Ansible in a managed virtual environment.PATCH /v1/deployments/:idtoPUT /v1/deployments/:id/stop.Removed
getPort,renderHeader,renderSummary,logViewerTitle, verbose error messages).appa instance *command file (replaced byappa server *).Fixed
DeploymentModel.Create()reported an error even on success.pipefailset.Apt update→apt update).Breaking
appa instance *commands no longer work — useappa server *instead.~/.appa/instances/→~/.appa/servers/. You'll need to move configs manually or recreate them.base_api_url→api_base_urlin your TOML files.PATCH /v1/deployments/:id→PUT /v1/deployments/:id/stop.compose.ymlis detected and stopped, replaced by Docker Stack.