Guides
Apps
- Introduction to Apps
- Image
- Direct Docker Image Deploy
- Companion Git Repository
- Migrating from Dockerfile Deploy
- Deploying Private Images
- Procfiles and `.aptible.yml`
- Using `aptible deploy`
- Dockerfile Deploy
- Configuration
- Services
- Releases
- Scaling
- Ephemeral SSH Sessions
- Git Remote
- .aptible.yml
- Security Scans
- Deprovisioning an App
- Deployment with CI/CD
Endpoints
Databases
Containers
Stacks
CLI
- Aptible CLI
- aptible apps
- aptible apps:create
- aptible apps:deprovision
- aptible apps:rename
- aptible apps:scale
- aptible backup:list
- aptible backup:orphaned
- aptible backup:purge
- aptible backup:restore
- aptible config
- aptible config:add
- aptible config:rm
- aptible config:set
- aptible config:unset
- aptible db:backup
- aptible db:clone
- aptible db:create
- aptible db:deprovision
- aptible db:dump
- aptible db:execute
- aptible db:list
- aptible db:modify
- aptible db:reload
- aptible db:rename
- aptible db:replicate
- aptible db:restart
- aptible db:tunnel
- aptible db:url
- aptible db:versions
- aptible deploy
- aptible domains
- aptible endpoints:database:create
- aptible endpoints:database:modify
- aptible endpoints:deprovision
- aptible endpoints:https:create
- aptible endpoints:https:modify
- aptible endpoints:list
- aptible endpoints:renew
- aptible endpoints:tcp:create
- aptible endpoints:tcp:modify
- aptible endpoints:tls:create
- aptible endpoints:tls:modify
- aptible environment:ca_cert
- aptible environment:list
- aptible environment:rename
- aptible help
- aptible log_drain:create:datadog
- aptible log_drain:create:elasticsearch
- aptible log_drain:create:https
- aptible log_drain:create:logdna
- aptible log_drain:create:papertrail
- aptible log_drain:create:sumologic
- aptible log_drain:create:syslog
- aptible log_drain:deprovision
- aptible log_drain:list
- aptible login
- aptible logs
- aptible logs_from_archive
- aptible metric_drain:create:datadog
- aptible metric_drain:create:influxdb
- aptible metric_drain:create:influxdb:custom
- aptible metric_drain:deprovision
- aptible metric_drain:list
- aptible operation:cancel
- aptible operation:follow
- aptible operation:logs
- aptible rebuild
- aptible restart
- aptible services
- aptible ssh
- aptible version
Tutorials
- Application Performance Monitoring
- CI Integration
- Aptible Demo App
- Deploying Grafana
- Direct Docker Image Deploy Example
- Dockerfile Deploy Example
- Exposing a Web App to the Internet
- Using Nginx with Aptible Endpoints
- Quickstart Guides
- Setting up Logging
- Automating Database Migrations
- Dockerfile Caching
- Using Domain Apex with Endpoints
- Accepting File Uploads
- Scheduling Tasks
- Serving Static Assets
- Terraform
- How to test a PostgreSQL Database's schema on a new version
- How to dump and restore PostgreSQL
- How to upgrade PostgreSQL with logical replication
- How to upgrade Redis
- How to upgrade MongoDB
- How to use mysqldump to Test for Upgrade Incompatabilities
- How to dump and restore MySQL
Troubleshooting
- Aptible Support
- App Processing Requests Slowly
- This Application Crashed
- before_release Commands Failed
- Build Failed
- Container Failed to Start
- Certificate Signing Requests
- Deploys Take Too long
- git Reference Error
- git Push "Everything up-to-date."
- HTTP Health Checks Failed
- App Logs Not Being Received
- PostgreSQL Replica max_connections
- Connecting to MongoDB fails
- MySQL Access Denied
- No CMD or Procfile in Image
- git Push Permission Denied
- aptible ssh Permission Denied
- PostgreSQL Incomplete Startup Packet
- PostgreSQL SSL Off
- Private Key Must Match Certificate
- aptible ssh Operation Timed Out
- SSL error ERR_CERT_AUTHORITY_INVALID
- SSL error ERR_CERT_COMMON_NAME_INVALID
- Unexpected Requests in App Logs
Companion Git Repository
❗️ Warning
Companion Git Repositories are a legacy mechanism!
There is now an easier way to provide Procfiles and .aptible.yml
when using Direct Docker Image Deploy. In practice, this means you should not need to use a companion git repository anymore.
For more information, review Procfiles and .aptible.yml
with Direct Docker Image Deploy.
📘 Tip
Companion Git Repositories can be disabled on request (your deployment will fail if you attempt to use them, as opposed to warn). See Disabling Companion Git Repositories for more detail.
Using a Companion Git Repository
Some features supported by Aptible don't map perfectly to Docker Images.
Specifically:
You can however use those along with Direct Docker Image Deploy by adding a Companion Git Repository.
Providing a Procfile
When you deploy directly from a Docker image, Aptible uses your image's CMD
to know which service command to run, you can create a separate App, or add a Procfile via a companion git repository.
To do so, create a new empty git repository containing a Procfile, and include all your services in the Procfile.
For example:
web: some-command
background: some-other-command
Then, push this git repository to your App's Git Remote. Make sure to push to the master
branch to trigger a deploy:
git push aptible master
When you do this, Aptible will use your Docker Image, but with the services defined in the Procfile.
Providing .aptible.yml
When you deploy directly from a Docker Image, you don't normally use a git repository associated with your app. This means you don't have a .aptible.yml
file.
Generally, we recommend architecting your app to avoid the need for a .aptible.yml file when using Direct Docker Image deploy, but if you'd like to use one nonetheless, that's supported.
To do so, create new empty git repository containing a .aptible.yml file, and include your desired configuration in it.
For example:
before_release:
- do some task
- do other task
Then, push this git repository to your App's Git Remote. Make sure to push to the master
branch to trigger a deploy:
git push aptible master
When you do this, Aptible will use your Docker Image, and run respect the instructions from your .aptible.yml file, e.g. by running before_release
commands;
Synchronizing git and Docker image deploys
If you are using a companion git repository to complement your Direct Docker Image deploy with a Procfile and / or a .aptible.yml file, you can synchronize their deploys.
To do so, push the updated Procfile and / or .aptible.yml files to a branch on Aptible that is not master. For example:
git push aptible master:update-the-Procfile
Pushing to a non-master will not trigger a deploy. Once that's done, deploy normally using aptible deploy
, but add the --git-commitish
argument, like so:
aptible deploy \
--app "$APP_HANDLE" \
--docker-image "$DOCKER_IMAGE" \
--git-commitish "$BRANCH"
This will trigger a new deployment using the image you provided, using the services from your Procfile and / or the instructions from your .aptible.yml file.
In the example above, $BRANCH
represents the remote branch you pushed your updated files to. In the git push
example above, that's update-the-Procfile
.
Disabling Companion Git Repositories
While we have to keep Companion Git Repositories around for backwards compatibility, as a user, you might wish to avoid using them altogether, even accidentally.
For dedicated Stacks, you can contact Aptible Support to have us disable this feature for you.
When Companion Git Repositories are disabled, your deploys must use either Direct Docker Image Deploy or Dockerfile Deploy (i.e. deploy via Git push). Attempts to perform mixed-mode deployment using Companion Git Repositories will raise an error.
How-to
If you'd like to go down this route, first make sure that you are not using Companion Git Repositories in your deployments.
There is a warning when you deploy that will inform you if that is the case, so look for that. The warning mentions "Deploying with a Companion Git Repository is deprecated".
If you find an app currently using a Companion Git Repository, you'll need to get rid of it. To do so, follow the instructions in Migrating from Dockerfile Deploy.
Once all your apps have been migrated, contact Aptible Support.