Skip to content

A static/WordPress website setup-deploy tool

Notifications You must be signed in to change notification settings

kaisermann/arke

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arke documentation

Requirements

Usage

fab {environment/scope} {task} [-u {user}] [-p {password}]


Remote-only:

fab {environment} setup
fab {environment} deploy
fab {environment} deploy:git
fab {environment} deploy:git,branchName
fab {environment} checkRequisites
fab {environment} fixPermissions
fab {environment} cleanup_releases
fab {environment} service_restart
fab {environment} service_reload


Project-environment-only:

fab project setup
fab project bundle
fab project install
fab project reset
fab project import_db

Documentation

arke.json example

{
  "project": {
    "repo": "git@github.com:user/repo.git",
    "type": "bedrock-wordpress",
    "fileStructure": {
      "shared": [
        ["robots.txt"],
        [".htaccess"],
        [".env"],
        ["web/app/uploads", "uploads"]
      ]
    },
    "cmds": {
      "install": [
        ["", "composer install"],
        ["web/app/themes/selene", "composer install"]
      ],
      "afterDeploy": [
        ["", "rm -rf fabfile.py arke.json readme.md .editorconfig"],
        ["", "composer install"],
        ["web/app/themes/selene", "composer install"]
      ],
    },
    "maxReleases": 5
  },
  "hosts": {
    "production": {
      "hosts": ["127.0.0.1"],
      "name": "example.staging.com",
      "projectDir": "/var/www",
      "projectPublicDir": "",
      "webRootDir": "web",
      "hostnames": "example.staging.com www.example.staging.com",
      "webServerUser": "www-data",
      "webServerGroup": "www-data",
      "services": {
        "toRestart": ["php5-fpm"],
        "toReload": ["nginx"]
      }
    }
  }
}

Project configuration

Field Description
repo The project's repository url
type The project's type.

Available options: html, php, simple-wordpress, bedrock-wordpress
fileStructure.shared A list of symbolic links to be created after each deploy. You can set a different name for the link by passing a second string to the link array. See example above.

Syntax: [projectPath, sharedPath]

Examples:

['robots.txt'] creates a link on the project's root directory to a robots.txt file on the root of the project's shared folder.

["web/app/uploads", "uploads"] creates a links on the projects web/app/ directory to a uploads directory on the root of the project's shared folder.
cmds.install A list of commands to be executed when 'fab local install' is executed.

Syntax: [executionPath, commandString]

Examples:

["", "composer install"] runs a composer install on the project's root.

["web/app/themes/selene", "composer install"] runs a composer install on the web/app/themes/selene directory.
cmds.afterDeploy A list of commands to be executed after each successfull deploy. Can use sudo.

Syntax: [executionPath, commandString]

Examples:

["", "rm -rf fabfile.py arke.json readme.md .editorconfig"] runs a rm command on the project's root.

["web/app/themes/selene", "composer install"] runs a composer install on the web/app/themes/selene directory.
maxReleases Number of releases to keep on the remote server.

Host(s) configuration

Field Description
hosts A list of the server ips/hostnames
name The project name. Used to create the server folder.
projectDir The project folder directory.

Example: /var/www
projectPublicDir The project public html directory.

Relative to {projectDir}/{name}.
webRootDir The project website directory.

Relative to {projectDir}/{name}/{projectPublicDir}. Can be an empty string.
hostnames The project hostnames that nginx will listen to. Can be overwritten in @task {environment}.
webServerUser User for nginx/apache (usually www-data)
webServerGroup User for nginx/apache (usually www-data)
services.toRestart Server's services to restart after each deploy.
services.toReload Server's services to reload after each deploy