• Stars
    star
    103
  • Rank 323,238 (Top 7 %)
  • Language
    Shell
  • License
    Creative Commons ...
  • Created over 8 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Buildpack for static websites on Dokku (nginx)

heroku-buildpack-nginx

This is the official dokku buildpack for static websites, powered by nginx.

Usage

All static files that you want to serve should be in the root directory of your repository. No need to use a separate www folder. buildpack-nginx will automatically download the buildpack, download NGINX, compile it, and install it. The next time you push your project, the buildpack will reuse the precompiled binaries.

Dokku

To trigger detection of this buildpack you need to add a dotfile:

Add an empty file called .static to your root directory of your web project (regardless if you use a custom value for NGINX_ROOT)

Heroku

Heroku users can use this buildpack by running the following command:

heroku buildpacks:set https://github.com/dokku/buildpack-nginx.git

Configuration

Custom nginx root

You can override the nginx root via setting the NGINX_ROOT environment variable. This should be a relative path in your repository.

# where the app is named `static-app`
# and the root dir is _site
dokku config:set static-app NGINX_ROOT=_site

Default to index for history routing

By default, this buildpack will 404 if a requested file is not found. For static sites that use the browser's history router to show the correct context, setting the NGINX_DEFAULT_REQUEST to a specific file will override this.

# where the app is named `static-app`
# and the desired default response is index.html
dokku config:set static-app NGINX_DEFAULT_REQUEST=index.html

Custom nginx config file

You may completely override the built-in nginx config by placing an app-nginx.conf.sigil file in the root, modeled after our own conf/app-nginx.conf.sigil. This will be used inside of the container, and not by the host Dokku instance. See the sigil project for more information concerning the sigil format.

Credits and License

buildpack-nginx is licensed under the CC0 1.0 Universal license and has been informed by many similar projects on the web.

Florian Heinemann

More Repositories

1

dokku

A docker-powered PaaS that helps you build and manage the lifecycle of applications
Shell
24,965
star
2

dokku-letsencrypt

Automatic Let's Encrypt TLS Certificate installation for dokku
Shell
1,048
star
3

dokku-postgres

a postgres plugin for dokku
Shell
444
star
4

sshcommand

Turn SSH into a thin client specifically for your app
Shell
361
star
5

dokku-redis

a redis plugin for dokku
Shell
240
star
6

dokku-mongo

a mongo plugin for dokku
Shell
171
star
7

ansible-dokku

Ansible modules for installing and configuring Dokku
Python
142
star
8

dokku-scheduler-kubernetes

Scheduler plugin for deploying applications to kubernetes
Shell
134
star
9

github-action

Shell
130
star
10

dokku-maintenance

dokku plugin that gives the ability to manage application maintenance mode
Shell
106
star
11

dokku-redirect

A plugin for dokku that gives the ability to set simple redirects for an application
Shell
98
star
12

dokku-mysql

a mysql plugin for dokku
Shell
92
star
13

dokku-elasticsearch

an elasticsearch plugin for dokku
Shell
88
star
14

dokku-http-auth

dokku plugin that gives the ability to manage HTTP basic auth for an application
Shell
78
star
15

plugn

Hook system that lets users extend your application with plugins
Shell
75
star
16

dokku-mariadb

a mariadb plugin for dokku
Shell
65
star
17

dokku-api

Unmaintained: HTTP API on top of Dokku Daemon
Ruby
59
star
18

dokku-graphite

a graphite, grafana, statsd, carbon plugin for dokku
Shell
55
star
19

dokku-rabbitmq

a rabbitmq plugin for dokku
Shell
45
star
20

dokku-rethinkdb

a rethinkdb plugin for dokku
Shell
42
star
21

dokku-scheduler-nomad

Scheduler plugin for deploying applications to nomad
Shell
32
star
22

dokku-daemon

A daemon wrapper around dokku
Shell
31
star
23

ci-docker-image

A Docker Image meant for use with CI/CD pipelines
Shell
27
star
24

dokku-memcached

a memcached plugin for dokku
Shell
25
star
25

dokku-couchdb

a couchdb plugin for dokku
Shell
25
star
26

gitlab-ci

A collection of gitlab-ci examples
Shell
24
star
27

docker-wait

Shell
23
star
28

dokku-nats

a nats plugin for dokku
Shell
23
star
29

dokku-meilisearch

a meillisearch plugin for dokku
Shell
22
star
30

dokku-clickhouse

a clickhouse plugin for dokku
Shell
18
star
31

dokku-copy-files-to-image

copies files from the host onto the container
Makefile
14
star
32

dokku-update

Shell
12
star
33

dokku-solr

a solr plugin for dokku
Shell
11
star
34

dokku-event-listener

Service that listens to docker events and runs dokku commands
Makefile
10
star
35

lambda-builder

A tool for building lambda function images or zips via Docker
Go
10
star
36

dokku-registry

Deprecated in favor of the official Registry plugin introduced in 0.25.x
Shell
9
star
37

compose-transpiler

Simple docker-compose.yml to dokku commands web utility
Vue
7
star
38

docker-grafana-graphite

Docker image with StatsD, Graphite, Grafana 6
JavaScript
6
star
39

docker-letsencrypt

Docker container for the "simp_le" Let's encrypt implementation running on Alpine Linux
Dockerfile
6
star
40

docker-ambassador

A maintained version of the ambassador linking pattern
Shell
6
star
41

procfile-util

A tool for interacting with Procfiles
Go
5
star
42

omakase

Go
5
star
43

dokku-pushpin

a pushpin plugin for dokku
Shell
5
star
44

docker-image-labeler

Adds and removes labels from docker images
Makefile
5
star
45

netrc

Utility that allows users to manage netrc files
Makefile
5
star
46

dokku-arch

Shell
5
star
47

docker-container-healthchecker

Runs healthchecks against local docker containers
Go
5
star
48

dokku-typesense

a typesense plugin for dokku
Shell
5
star
49

service-proxy

An app that can be used to proxy to a datastore service's web ui
Shell
3
star
50

dokku.github.io

A blog for dokku
SCSS
3
star
51

dokku-orb

Python
3
star
52

docker-run-export

exports the flags passed to a `docker run` call to a variety of formats
Go
2
star
53

websocket-example

Go
2
star
54

.github

Organization Repository
Shell
2
star
55

smoke-test-app

Smoke test app for dokku test suite
Python
2
star
56

dokku-omnisci

an omnisci plugin for dokku
Shell
2
star
57

dokku-cron-restart

Shell
2
star
58

heroku-buildpack-null

A buildpack that performs no actions, for testing purposes
Shell
1
star
59

docker-image-updater

A tool to manually or automatically manage updated docker images
1
star
60

duplex

Full duplex modern RPC
Go
1
star
61

smoke-test-plugin

Smoke test plugin for dokku test suite
Go
1
star
62

smoke-test-gradle-app

Java
1
star
63

tutorials

An mkdocs-based tutorial site
Shell
1
star
64

arch-herokuish

Mirror of AUR git repo for https://github.com/gliderlabs/herokuish
Shell
1
star
65

prop

A golang-based cli interface for manipulating config backed by various datastores
Go
1
star
66

test-app-5065

Python
1
star
67

docs

Docs site in generated html form
HTML
1
star
68

github-playground

a playground to test github functionality
1
star
69

dokku-ansible

an ansible plugin for dokku
Shell
1
star