Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMP + AMP Dashboard Deployment Scripts

Image-only deployment scripts for AMP and amp-dashboard. This repo does not build or contain application source code — it pulls pre-built container images and runs them with Docker Compose. Traefik is optional.

Layout

deploy/
  .env                              # your local config (not committed)
  .env.example                      # sample/reference config
  deploy.sh                         # main orchestrator script
  amp/docker-compose.yml            # AMP app + bundled AMP Postgres DB
  amp-dashboard/docker-compose.yml            # Dashboard stack
  amp-dashboard/docker-compose.traefik.yml    # optional Traefik overlay for dashboard
  traefik/docker-compose.yml        # optional shared Traefik stack
  backups/                          # local restore files (not committed)

backups/ are git-ignored on purpose — they contain real database/upload data and must never be pushed to this repository.

Setup

The script prefers the docker compose plugin and automatically falls back to the standalone docker-compose command when the plugin is unavailable. Docker and a compatible Compose command must be installed: Docker Compose v2 is recommended; standalone Compose must be at least v1.27 to read these versionless Compose Specification files. The script rejects older versions before deployment. The script checks support for --env-file and pull --quiet before using them. Older versions without --env-file use the variables exported from your .env by the script instead.

An error such as Invalid interpolation format ... "${REDIS_PASSWORD:-admin}" or a reference to a service named services indicates an obsolete Compose parser. Install Docker Compose v2 on the deployment host and verify docker compose version before rerunning the deployment; changing only the Redis interpolation does not make the rest of the file compatible with that parser.

  1. Copy the sample env and fill in real values:
    cp .env.example .env
    
  2. Edit .env with your image tags, domains, DB credentials, and (optionally) restore file paths.

Usage

./deploy.sh deploy [--with-traefik|--without-traefik]   # pull images, start/update stacks
./deploy.sh up      [--with-traefik|--without-traefik]  # start/update stacks (no pull)
./deploy.sh down    [--with-traefik|--without-traefik]  # stop stacks (volumes kept)
./deploy.sh restart [--with-traefik|--without-traefik]  # down + up
./deploy.sh pull    [--with-traefik|--without-traefik]  # pull images only
./deploy.sh status  [--with-traefik|--without-traefik]  # show running containers
./deploy.sh logs <traefik|amp|dashboard|container> [service]

By default, commands operate on both application stacks. Add --only-amp or --only-dashboard to deploy, up, down, restart, pull, or status to operate on just one stack:

./deploy.sh deploy --only-amp
./deploy.sh deploy --only-dashboard
./deploy.sh restart --only-amp
./deploy.sh pull --only-dashboard

The two selection flags cannot be combined. Only the selected stack's Compose file is required; the other stack's registry login and data initialization are skipped. Single-stack commands leave shared Traefik untouched unless --with-traefik is supplied explicitly (even if USE_TRAEFIK=true is set). For a dashboard-only update behind an existing Traefik instance, use --with-traefik to include the dashboard Traefik overlay. This also manages the shared Traefik stack, so a targeted down or restart with that flag can interrupt routing to both applications.

Traefik is optional and can be toggled via --with-traefik / --without-traefik, or the USE_TRAEFIK=true|false env var. If neither is set, Traefik is enabled automatically only when traefik/docker-compose.yml exists.

Restores

Restores (AMP Postgres, dashboard Postgres, dashboard MySQL, dashboard uploads) are opt-in and require explicit backup file paths in .env:

  • AMP_DB_BACKUP_FILE
  • DASHBOARD_POSTGRES_BACKUP_FILE
  • DASHBOARD_MYSQL_BACKUP_FILE
  • DASHBOARD_UPLOADS_SOURCE

If a path is left unset, that restore step is skipped. When running from an interactive terminal, the script asks for confirmation before each configured restore. For non-interactive runs (CI/cron), set ASSUME_YES_RESTORE=true to auto-approve.

Notes

  • This repo is consumed as a git submodule (deploy/) from the main amp repository.
  • Restores use direct docker exec commands against the running DB containers and are non-fatal — a failed restore logs a warning and deployment continues.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages