alfred

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2018 License: MIT Imports: 1 Imported by: 0

README

Introduction

Build Status Go Report Card

Alfred is a development environment for applications using Docker. It's not a replacement for Docker Compose but a simpler way to use docker when you develop sites or applications for customers.

No windows support (yet, pull request?).

Check out the examples.

Setup

Before using Alfred you have to point all *.test domains to localhost.

Proxy container

Alfred requires a proxy container like nginx or Caddy to proxy domains to the right container.

The first time you use Alfred to start the proxy container, the type flag is optional to switch proxy container. Default proxy container is Caddy.

The proxy containers will only bind port 80 and not 443 (yet, pull request?).

alfred proxy start [--type=nginx]

You can stop the proxy container with alfred proxy stop or delete the Docker container.

Application container

You're application don't need a configuration file but it's recommended since the default configuration may not work for you're application. If you just have HTML site it's easy. Checkout the HTML example.

{
    "path": "./public"
}

If you need some more advanced or running PHP or some other language you need to configure which image is used and maybe environment variables.

{
    "image": "isotopab/php:7.0-apache",
    "env": [
        "SITEPATH=/var/www/html/public"
    ]
}

When you ready with your configuration you just run alfred start in the same directory as the alfred.json exists in, if no config file exists in will use the default configuration which are configured for a HTML site.

Configuration

The real configuration used for starting a application container can be view running alfred config. This shows the HTML example configuration.

{
  "env": [
    "VIRTUAL_HOST=html.test",
    "VIRTUAL_PORT=2015"
  ],
  "domains": [],
  "image": "joshix/caddy",
  "host": "html.test",
  "links": [],
  "port": 2015,
  "path": "/u/go/src/github.com/frozzare/alfred/examples/html/public:/var/www/html:ro"
}

All values can be modified with alfred.json. The host value is based on your folder if no config value exists.

Specific configuration documentation.

  • host string is based on your folder if no config value exists, can contain tld.
  • links array should contain container names, e.g redis or redis3:redis
  • domains array should contain any extra domains that should be configured with the application container.

License

MIT © Fredrik Forsmo

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cli
url
internal
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL