1.9.0 • Published 5 years ago

http-deployer v1.9.0

Weekly downloads
1
License
UNLICENSED
Repository
github
Last release
5 years ago

Simple HTTP Deploy tool

It will update package version in docker-compose and run commands:

docker-compose -f custom.docker-compose.yml up -d

Previous docker compose file will be saved as {previousDockerComposePath}_{previousImageVersion}

Configuration

Configuration by environment variables:

  • DEPLOYER_PORT - port that Express listen
  • DEPLOYER_CONFIG_PATH - path to JSON file with projects config

JSON config file should contain array, each element have to implement ConfigInterface

Requesting

Request

POST /

Content-Type: application/json

{
  "name": "image-name",
  "tag": "docker-registry.private.com/image-name:1.0.0"
}

Response

Content-Type: application/json

Http CodeJSON CodeMessageWhat to do?
2000SuccessfulDrink beer
403-1ForbiddenTry to pass valid
422101Missing name or tag in bodyPut JSON body with name and tag fields
422102{name} deploy does not existConfigure {name} deploy on server
501201Compose file does not existFix path to docker-compose file in global configuration
501202Can not find image name in docker-compose fileMake sure that image specified in docker-compose file. Image name should be placed between " and have 3-digit version after : (example: "image-name:1.0.0)
501203Invalid {type} time: {invalidTimeFormat}Make sure that time rules in configuration if specified in format HH:MM:SS
500301BeforeDeploy ErrorError in some BeforeDeploy script. See deploy logs for details and improve script
500302DockerDeploy ErrorError while executing docker-compose up -d. See deploy logs for details
500303AfterDeploy ErrorError in some AfterDeploy script. See deploy logs for details and improve script
503403Update not availableTry run update considering time specified in time rules

Notice: message can be changed in minor version. You should not parse it and depend your CI process on it.

Example:

{
  "code": 0,
  "message": "Successful"
}

Request

GET /status/:projectName

Response

Content-Type: application/json

Http CodeJSON CodeMessageWhat to do?
2000SuccessfulOrder Pizza
501201Compose file does not existFix path to docker-compose file in global configuration
503any numberDocker ErrorCheck executing docker-compose ps on server

Notice: message can be changed in minor version. You should not parse it and depend your CI process on it.

Example:

{
  "code": 0,
  "message": "Successful",
  "containers": [
    {
      "name": "app-1",
      "state": "Up"
    },
    {
      "name": "app-2",
      "state": "Restarting"
    }
  ]
}

Author

Alexander Letnikow

License

MIT

1.9.0

5 years ago

1.8.6

5 years ago

1.8.5

5 years ago

1.8.4

5 years ago

1.8.3

5 years ago

1.8.2

5 years ago

1.8.1

5 years ago

1.8.0

5 years ago

1.7.3

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago