Projects
Temp Directory
Harpoon will create a directory named .harpoon
in your current
working directory. You should add this to your .gitignore
.
Docker Compose
If your project uses docker-compose
, here's an example
docker-compose.yml
:
version: '3.4'
services:
app:
build: .
environment:
- TERM=xterm
labels:
- "traefik.backend=app"
- "traefik.port=9000"
- "traefik.frontend.rule=Host:app.example.com"
- "traefik.frontend.entryPoints=http" # add ',https' for HTTPS support
- "traefik.docker.network=harpoon"
- "traefik.tags=harpoon"
ports:
- "9000:9000"
volumes:
- .:/app
networks:
default:
external:
name: harpoon
- You'll need to specify all the
traefik.*
labels for your web service, customizing thebackend
,port
, andfrontend
labels accordingly. - Then copy/paste the
networks
block to the bottom of yourdocker-compose.yml
.
Tasks
Harpoon provides a simple task running engine, which you can customize
for your project. In the root of your project, just add a tasks.sh
like the following:
#!/usr/bin/env bash
welcome() {
printf " Welcome to Macintosh."
}
case "$command" in
welcome) ## <args...> %% Welcomes you
welcome ;;
*)
harpoon help ;;
esac
This is just like any other bash
script, so you have full access to
your shell.
Custom environment variables, especially those that you're overriding
from Harpoon's defaults, should go in your project root in
harpoon.env.sh
or harpoon.boot.sh
.