Gitamic
SupportPurchase
  • πŸ‘‹Hi, Gitamic!
  • πŸš€Release notes
  • πŸ’³Purchase a license
  • πŸ›£οΈRoadmap
  • Getting Started
    • πŸ’ΎInstallation
    • πŸŽ›οΈSetup
    • πŸ›³οΈDeployment
  • Using Gitamic
    • ℹ️Git basics
    • β˜‘οΈReviewing changes
    • ⏺️Creating commits
      • Writing commit messages
      • Atomic commits
    • πŸ”ƒPushing & pulling
  • Legal, Security, Support
    • πŸ§‘β€βš–οΈLicense agreement
    • πŸ”Security policy
    • 🐞Report an issue
    • πŸ› οΈFeature requests
  • πŸ™ŠAbout me
Powered by GitBook
On this page
  • Authentication
  • Auto-deployment

Was this helpful?

Edit on GitHub
  1. Getting Started

Deployment

Some notes on various deployment scenarios whilst using Gitamic.

PreviousSetupNextGit basics

Last updated 1 year ago

Was this helpful?

Authentication

When building your application in its production environment or running it through a pipeline, you will likely need to install its dependencies, and this may include Gitamic.

When that happens, Composer will need to authenticate against the private repository in order to install Gitamic.

You probably don't want to be doing this manually in a terminal every time – and !

How you authenticate will depend on how you deploy:

Laravel Forge has for private package repository authentication.

  • Repository URL: gitamic.composer.sh

  • Username: Your Anystack email address

  • Password: (which depends on how you purchased it)

Create a COMPOSER_AUTH Environment Variable with the JSON structure that Composer expects, e.g.

{"http-basic":{"HOSTNAME":{"username":"USERNAME","password":"PASSWORD"}}}

Replace the placeholders with the following values:

  • HOSTNAME: gitamic.composer.sh

  • USERNAME: Your Anystack email address

  • PASSWORD: (which depends on how you purchased it)

For compatibility, remove all spaces and line breaks.

Any of the following methods should work. You only need to pick one.

auth.json

You can create an auth.json file or in that stores these credentials.

Do not commit your auth.json file to git

COMPOSER_AUTH

Create a COMPOSER_AUTH environment variable similarly to the approach used for Netlify.

You can set this environment variable in your shell config file or you can create it on-the-fly as part of your composer CLI commands:

COMPOSER_AUTH={JSON} composer install ...

See the Netlify example for what to replace the {JSON} placeholder with

Auto-deployment

If you're using Gitamic to push commits from a server that is also the target for automated deployments, when you push from Gitamic it might trigger a redundant deployment back to the environment that is the source of those changes.

To prevent this, in your deployment script, you will need to write a statement that exits the deployment when it detects that Gitamic initiated the commit.

For example, if you use (and you haven't customised the git commiter name - see ), you could add the following to the beginning of your deploy script, which inspects the author of the commit and stops the process before it begins:

[[ "$FORGE_DEPLOY_AUTHOR" == "Gitamic" ]] && echo "Commit by $FORGE_DEPLOY_AUTHOR" && exit 0

# The rest of your deployment script...

However, the specific approach you should use will depend on your unique setup.

πŸ›³οΈ
thanks to Composer, you don't have to
built-in support
in your project
a global auth.json
Laravel Forge
#2.-optional-set-the-git-committer
Your license key
Your license key