Compare commits
44
Commits
45b6418679
..
posix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
803dcd1e10 | ||
|
|
ed3c5a0c7c | ||
|
|
f429b8c38d | ||
|
|
be777fc9e6 | ||
|
|
90bb97cca8 | ||
|
|
60668fc80a | ||
|
|
f2bcbc6857 | ||
|
|
ca7338bcb6 | ||
|
|
7163c844c9 | ||
|
|
084a25c627 | ||
|
|
6192d73cbe | ||
|
|
3e55cdcd14 | ||
|
|
55fae625d6 | ||
|
|
f541ca418b | ||
|
|
234739e531 | ||
|
|
ac41e6e5f9 | ||
|
|
c08c379565 | ||
|
|
32e2624245 | ||
|
|
653a3c9415 | ||
|
|
35999574bd | ||
|
|
a346d4f4e1 | ||
|
|
990b99f0c0 | ||
|
|
e7eab505e9 | ||
|
|
3437b58078 | ||
|
|
5b4db64114 | ||
|
|
6c97f99f87 | ||
|
|
3a64c47260 | ||
|
|
1d44a2ff32 | ||
|
|
e2e34d813e | ||
|
|
ad1d624ccc | ||
|
|
53030aa6a9 | ||
|
|
181a3e9fc0 | ||
|
|
0f37f27563 | ||
|
|
b6b4522d31 | ||
|
|
0e09506efd | ||
|
|
afa9990f6b | ||
|
|
4c2619e4e0 | ||
|
|
bc94d38348 | ||
|
|
9f80ab9220 | ||
|
|
4cd1aae963 | ||
|
|
6e982393ac | ||
|
|
d3558d0208 | ||
|
|
ca0c095ccc | ||
|
|
20d6cdfe72 |
@@ -2,4 +2,3 @@ DOCKER_MACHINE=${DOCKER_MACHINE}
|
||||
DOCKER_SOCKET_LOCATION=${DOCKER_SOCKET_LOCATION}
|
||||
DOCKER_SYSTEM=${DOCKER_SYSTEM}
|
||||
DOMAIN=${DOMAIN}
|
||||
STACK=${STACK}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
--require spec_helper
|
||||
--shell bash
|
||||
--default-path spec
|
||||
--pattern "*_spec.sh"
|
||||
@@ -0,0 +1,41 @@
|
||||
# myos, for agents working on this repository
|
||||
|
||||
myos runs docker compose stacks. `skills/myos/SKILL.md` explains how to *use*
|
||||
it; this file is about changing it.
|
||||
|
||||
## Check your work
|
||||
|
||||
```sh
|
||||
make test # unit + golden, both engines, docker is mocked
|
||||
make lint # shellcheck
|
||||
```
|
||||
|
||||
Golden tests compare the output of the CLI **and** of the legacy make engine
|
||||
against recordings made at the tag `legacy-1.0-beta`. If a change moves an
|
||||
output on purpose, record the CLI expectation in `spec/golden/expected.cli/`
|
||||
and write down why in `spec/golden/DELTAS.md`. Never edit
|
||||
`spec/golden/expected/` by hand: it is the behaviour of the old engine.
|
||||
|
||||
## Layout
|
||||
|
||||
See `skills/myos/references/authoring.md`. In short: `bin/myos` parses and
|
||||
dispatches, `lib/*.sh` holds one concern each, `lib/cmd/<name>.sh` holds one
|
||||
command each, `share/compose/` holds the two overlays the framework itself
|
||||
provides, and the stacks live in another repository, `myos-stacks`.
|
||||
|
||||
## Shell constraints
|
||||
|
||||
POSIX shell only: this runs on the bash 3.2 of macOS and on Alpine. No `local`,
|
||||
no arrays, no `[[`. Two traps already paid for:
|
||||
|
||||
- `[a-z]` in a `case` pattern also matches uppercase under a `fr_FR` collation;
|
||||
use `[:lower:]`.
|
||||
- a function called inside `$( )` cannot return anything through a global.
|
||||
|
||||
## Do not
|
||||
|
||||
- Reintroduce a `stack/` or `docker/` directory here: they belong to
|
||||
`myos-stacks`.
|
||||
- Make an unknown command or an unknown stack succeed silently.
|
||||
- Change a default project name without an entry in `DELTAS.md` and a note in
|
||||
the skill: it renames the containers and volumes of every deployment.
|
||||
@@ -1,5 +1,57 @@
|
||||
# CHANGELOG
|
||||
|
||||
## v2.0.0-dev - 2026-09-03
|
||||
|
||||
- new bash CLI (`bin/myos`, `lib/`): one model for a project directory, a
|
||||
catalogue stack, a group and a host singleton
|
||||
- unknown command or unknown stack now fails, instead of succeeding silently
|
||||
- default compose project is `<user>-<env>-<app>`; set
|
||||
`MYOS_PROJECT_FORMAT=user-app-env` on deployments created before this
|
||||
- `myos ls`, `myos env`, `myos doctor` to inspect an installation
|
||||
- `install.sh`, and the catalogue is looked up beside the installation
|
||||
- agent skill in `skills/myos/`, contributor notes in `AGENTS.md`
|
||||
- stacks carry their settings in `<name>.env` and `<name>.sh` hooks, so the
|
||||
catalogue no longer needs make to be installed
|
||||
- lazy defaults (`myos_default_<VAR>` functions) give the recursive `?=` of
|
||||
make in pure shell: an explicit value wins, and the default is recomputed
|
||||
at each reference
|
||||
- `myos env-update` generates a `.env` from the `.env.dist` templates,
|
||||
expanding `${VAR}` and `$(command)`, including forward references
|
||||
- the project `.env` now wins over `/etc/conf.d/myos`, as documented;
|
||||
`MYOS_CONF_PRIORITY=system` restores the previous order
|
||||
- `share/make/shim.mk`: make as an optional front end over the same shell code
|
||||
- `myos expose` reports what each stack publishes and to whom, and `--strict`
|
||||
fails when a port faces the world without saying so. `MYOS_BIND_PUBLIC`,
|
||||
`_PRIVATE` and `_MESH` let a stack bind its published ports, which replaces
|
||||
the linux-only ufw-docker patching with something that behaves the same on
|
||||
macOS and needs no privilege. The scope is read from the compose file rather
|
||||
than declared beside it, so it cannot disagree with what is published
|
||||
- `myos cert` derives the certificates a server needs from the route tags its
|
||||
stacks publish, and asks dehydrated for them: a wildcard where a tag uses one,
|
||||
a certificate per name otherwise. The `host/dehydrated` stack answers http-01
|
||||
itself and delegates dns-01 to a provider hook
|
||||
- commands chain: `myos build up logs host/fabio`, as make targets did
|
||||
- the stack catalogue no longer needs make at all: its settings are hooks, and
|
||||
only six stacks keep a .mk, for targets
|
||||
- a stack found in several directories of the stack path is merged, project
|
||||
last, so a project refines a catalogue stack instead of replacing it
|
||||
- `--color always|never|auto`, and no colour when the output is piped
|
||||
- verified under the /bin/sh of Alpine (busybox) and Debian (dash)
|
||||
- the make engine still works and is still covered by the golden tests
|
||||
|
||||
## v1.1 - 2026-09-03
|
||||
|
||||
- move the stack catalogue and the docker build contexts to the myos-stacks project
|
||||
- keep the framework infra compose files in share/compose and the myos tool image in share/docker
|
||||
- fix stack_path resolution: host/<svc> stacks were only found when the project
|
||||
stack directory sorted first
|
||||
- drop the docker/compose image fallback: docker compose >= 2.24.4 or docker-compose is required
|
||||
- add a shellspec golden test harness (make test)
|
||||
|
||||
## v1.0-beta - 2026-07-29
|
||||
|
||||
* split make files in `myos` project and docker files in `stack` project
|
||||
|
||||
## v1.0-alpha - 2022-11-29
|
||||
|
||||
* node is host
|
||||
|
||||
@@ -1 +1,35 @@
|
||||
DEV_TARGETS := test test-unit test-golden test-integration test-portability lint golden-record
|
||||
ifneq ($(filter $(DEV_TARGETS),$(MAKECMDGOALS)),)
|
||||
|
||||
SHELLSPEC ?= shellspec
|
||||
SHELLCHECK ?= shellcheck
|
||||
|
||||
.PHONY: $(DEV_TARGETS)
|
||||
test: ## Run unit + golden tests against both engines
|
||||
$(SHELLSPEC)
|
||||
MYOS_ENGINE=cli $(SHELLSPEC) spec/golden
|
||||
test-unit: ## Run unit tests only
|
||||
$(SHELLSPEC) spec/unit
|
||||
test-golden: ## Run golden tests only (MYOS_ENGINE=legacy|cli)
|
||||
$(SHELLSPEC) spec/golden
|
||||
test-integration: ## Run tests needing a real docker daemon
|
||||
MYOS_INTEGRATION=1 $(SHELLSPEC) spec/integration
|
||||
golden-record: ## Re-record golden expectations from the legacy engine
|
||||
spec/golden/record.sh $(CASES)
|
||||
test-portability: ## Run the CLI under the /bin/sh of Alpine and Debian
|
||||
@for img in alpine:3.20 debian:13-slim; do \
|
||||
printf '%s: ' "$$img"; \
|
||||
tar cf - --exclude .git . | docker run -i --rm "$$img" /bin/sh -c \
|
||||
'mkdir -p /myos && tar xf - -C /myos && cd /tmp && \
|
||||
export PATH=/myos/spec/support/bin:$$PATH && \
|
||||
/myos/bin/myos version >/dev/null && \
|
||||
/myos/bin/myos -C /myos/spec/fixtures/host-project -n up host >/dev/null && \
|
||||
echo ok'; \
|
||||
done
|
||||
|
||||
lint: ## shellcheck all shell sources
|
||||
$(SHELLCHECK) -s bash myos spec/golden/record.sh spec/support/run.sh spec/support/bin/* $(wildcard bin/* lib/*.sh lib/cmd/*.sh install.sh)
|
||||
|
||||
else
|
||||
include make/include.mk
|
||||
endif
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
# myos - Make Your Own Stack
|
||||
|
||||
Docker paas based on docker compose and make files.
|
||||
myos runs docker compose stacks: on a server, in a project directory, for a user.
|
||||
It is a thin layer over `docker compose` that resolves which compose files to load,
|
||||
under which project name, with which environment variables.
|
||||
|
||||
Make Your Own Stack provides common make targets to build and run docker projects.
|
||||
The framework itself ships no stack. Ready-to-use stacks (consul, fabio, registrator,
|
||||
postgres, supabase, drone, …) live in a separate catalogue,
|
||||
[myos-stacks](https://github.com/aya/myos-stacks).
|
||||
|
||||
## Disclaimer
|
||||
|
||||
@@ -10,197 +14,144 @@ This is beta software, use it at your own risks.
|
||||
|
||||
## Requirements
|
||||
|
||||
You need `docker`, `git` and `make`.
|
||||
`docker` (with the `docker compose` plugin >= 2.24.4, or a `docker-compose` binary),
|
||||
`git` and `make`.
|
||||
|
||||
## Install
|
||||
|
||||
* Include MYOS file `make/include.mk` adding the following lines to your project file `Makefile`.
|
||||
### As a command
|
||||
|
||||
```sh
|
||||
sudo git clone https://github.com/aya/myos /usr/local/lib/myos
|
||||
sudo ln -s /usr/local/lib/myos/myos /usr/local/bin/myos
|
||||
```
|
||||
MYOS ?= ../myos
|
||||
MYOS_REPOSITORY ?= $(patsubst %/$(APP),%/myos,$(APP_REPOSITORY))
|
||||
APP ?= $(lastword $(subst /, ,$(APP_REPOSITORY)))
|
||||
APP_REPOSITORY ?= $(shell git config --get remote.origin.url 2>/dev/null)
|
||||
$(MYOS):
|
||||
-@git clone $(MYOS_REPOSITORY) $(MYOS)
|
||||
|
||||
Optionally pin per-machine settings in `/etc/conf.d/myos` (or `/etc/default/myos`),
|
||||
one `VAR=value` per line, no comments:
|
||||
|
||||
```sh
|
||||
DOMAIN=example.org
|
||||
ENV=master
|
||||
```
|
||||
|
||||
`myos` runs from the current directory: it passes it as `WORKDIR`, so stacks and
|
||||
`.env` are looked up there. A `WORKDIR` set in the config file wins over the current
|
||||
directory, which pins a machine to its deployment directory.
|
||||
|
||||
### As a make include
|
||||
|
||||
Add to your project `Makefile`:
|
||||
|
||||
```make
|
||||
MYOS ?= /usr/local/lib/myos
|
||||
-include $(MYOS)/make/include.mk
|
||||
```
|
||||
|
||||
* Call the `make help` command to show available targets.
|
||||
Then `make help` lists the available targets.
|
||||
|
||||
```
|
||||
$ make help
|
||||
Usage:
|
||||
make [target]
|
||||
### Stack catalogue
|
||||
|
||||
Targets:
|
||||
help This help
|
||||
[...]
|
||||
myos looks for stacks in `./stack`, `../stack`, `~/.local/share/myos/stack`,
|
||||
`/usr/local/share/myos/stack` and `/usr/share/myos/stack`:
|
||||
|
||||
```sh
|
||||
sudo git clone https://github.com/aya/myos-stacks /usr/local/share/myos
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Examples
|
||||
|
||||
* Configure myos for domain `domain.tld` and stack `default`
|
||||
|
||||
```shell
|
||||
$ make bootstrap DOMAIN=domain.tld STACK=default
|
||||
```sh
|
||||
myos doctor # check the installation first
|
||||
myos ls # what stacks are reachable
|
||||
myos -n up host # print what it would run
|
||||
myos up # the stack of the current directory
|
||||
myos up STACK=host # a group of stacks, see stack/host/host.mk
|
||||
myos up STACK=host/fabio # a single stack
|
||||
myos up STACK=postgres:9.6 # a versioned stack
|
||||
myos ps
|
||||
myos logs
|
||||
myos config # rendered compose file
|
||||
myos down
|
||||
myos shutdown # every stack: app, host and user
|
||||
```
|
||||
|
||||
* Start myos stack `host`
|
||||
### How a stack is resolved
|
||||
|
||||
```shell
|
||||
$ make host
|
||||
```
|
||||
|
||||
`make host` starts the stack `host` with docker host services :
|
||||
- consul (service discovery) on host port 8500
|
||||
- fabio (load balancer) on host ports 80 and 443
|
||||
- registrator (docker/consul bridge)
|
||||
|
||||
* Stop myos
|
||||
|
||||
```shell
|
||||
$ make shutdown
|
||||
```
|
||||
|
||||
### Variables
|
||||
|
||||
* DEBUG
|
||||
|
||||
Show executed commands.
|
||||
|
||||
```shell
|
||||
$ make up DEBUG=true
|
||||
```
|
||||
|
||||
* DRYRUN
|
||||
|
||||
Do nothing, show commands instead of executing it.
|
||||
|
||||
```shell
|
||||
$ make up DRYRUN=true
|
||||
```
|
||||
|
||||
* VERBOSE
|
||||
|
||||
Show called functions.
|
||||
|
||||
```shell
|
||||
$ make up VERBOSE=true
|
||||
```
|
||||
|
||||
* Show variable USER
|
||||
|
||||
```shell
|
||||
$ make print-USER
|
||||
```
|
||||
|
||||
#### Setup
|
||||
|
||||
* SETUP_LETSENCRYPT
|
||||
|
||||
Generate ${DOMAIN} certificate files with letsencrypt.
|
||||
|
||||
By default, myos generates invalid ${DOMAIN} certificate files with openssl.
|
||||
You can use letsencrypt instead, to generate valid wildcard certificate files.
|
||||
|
||||
To achieve this, you must add following DNS entries to domain ${DOMAIN} to prove you own it:
|
||||
A stack is a directory of compose files. For `STACK=<name>` in environment `ENV`,
|
||||
myos loads, in order, whichever of these exist:
|
||||
|
||||
```
|
||||
_acme-challenge.${DOMAIN} IN CNAME ${DOMAIN}.acme.${DOMAIN}.
|
||||
acme.${DOMAIN}. IN NS certbot.${DOMAIN}.
|
||||
certbot.${DOMAIN}. IN A ${DOCKER_HOST_INET4}
|
||||
<name>.yml <name>.<ENV>.yml <ENV>/<name>.yml
|
||||
<name>.<suffix>.yml <name>.<suffix>.<ENV>.yml <name>.<version>.yml
|
||||
```
|
||||
|
||||
In this config, DOCKER_HOST_INET4 should be the external IP address of the server running certbot.
|
||||
Port 53 of this IP address must be reachable from internet and point to this server.
|
||||
`<suffix>` comes from the `COMPOSE_FILE_*` variables that are not `false`
|
||||
(`app`, `labels`, `networks`, `ssh`, `volumes` by default; add e.g.
|
||||
`COMPOSE_FILE_WWW=true` to also load `<name>.www.yml`). The framework always
|
||||
appends its own `share/compose/networks.yml`.
|
||||
|
||||
If you want a simple DNS configuration to host all your services on the same server, you can setup following DNS config:
|
||||
### Project names and networks
|
||||
|
||||
```
|
||||
@ IN A ${DOCKER_HOST_INET4}
|
||||
*.${DOMAIN}. IN CNAME ${DOMAIN}.
|
||||
_acme-challenge.${DOMAIN} IN CNAME ${DOMAIN}.acme.${DOMAIN}.
|
||||
acme.${DOMAIN}. IN NS ${DOMAIN}.
|
||||
| stack | compose project | meaning |
|
||||
|---|---|---|
|
||||
| `host/*` | `$(HOSTNAME)` | one instance per machine: ports 80/443, consul, certbot |
|
||||
| `User/*` | user identity | one instance per user |
|
||||
| anything else | `<user>-<app>-<env>` | many instances per machine |
|
||||
|
||||
Networks: `default` = `_<project>` (private to the project), `private` =
|
||||
`<user>-<env>` and `public` = `<hostname>`, both external and created on demand.
|
||||
|
||||
## Variables
|
||||
|
||||
| variable | effect |
|
||||
|---|---|
|
||||
| `DEBUG=true` | show executed commands |
|
||||
| `DRYRUN=true` | print commands instead of running them |
|
||||
| `VERBOSE=true` | show called functions |
|
||||
| `ENV=<env>` | environment: selects `.env.<env>` and the `<name>.<env>.yml` overlays |
|
||||
| `STACK=<refs>` | stacks to act on |
|
||||
| `SERVICE=<name>` | target one compose service (`exec`, `run`, `logs`, `scale`) |
|
||||
| `MYOS_PROJECT_FORMAT` | `user-env-app` (default) or `user-app-env` for deployments made before myos 2.0 |
|
||||
|
||||
```sh
|
||||
myos env COMPOSE_FILE # show a variable
|
||||
myos env COMPOSE_PROJECT_NAME
|
||||
myos config <stack> # the rendered compose file
|
||||
```
|
||||
|
||||
This will point domain ${DOMAIN} to the IP address ${DOCKER_HOST_INET4} of this server, and point all subdomains *.{DOMAIN} to the ip address pointed by ${DOMAIN}.
|
||||
The make targets keep working: `print-VAR`, `stack-<stack>-<command>`,
|
||||
`<command>@<env>`, and a project `Makefile` that includes `make/include.mk`.
|
||||
|
||||
At this point, you should be able to generate a valid certificate for *.${DOMAIN} using certbot [dns standalone](https://github.com/siilike/certbot-dns-standalone) plugin.
|
||||
This task is done automatically when creating the host stack if SETUP_LETSENCRYPT variable is not empty.
|
||||
`SETUP_UFW=true` enables the ufw/ufw-docker integration (`myos setup-ufw`).
|
||||
|
||||
If you already launched myos host stack before, the ${DOMAIN} certificates has been automatically generated by openssl and you should remove them before trying to generate them with letsencrypt.
|
||||
## With make
|
||||
|
||||
```
|
||||
$ make host-down
|
||||
$ docker volume rm $(hostname)
|
||||
A project that would rather drive make can include the shim, which turns every
|
||||
myos command into a make target while leaving its own targets alone:
|
||||
|
||||
```make
|
||||
MYOS ?= /usr/local/lib/myos
|
||||
include $(MYOS)/share/make/shim.mk
|
||||
```
|
||||
|
||||
You can then test the letsencrypt certificate generation using DEBUG mode that force to use the letsencrypt staging server.
|
||||
`make up STACK=host` then runs exactly what `myos up host` runs: the shim only
|
||||
forwards. make is not needed otherwise, and the CLI never calls it.
|
||||
|
||||
```
|
||||
$ make host SETUP_LETSENCRYPT=true DEBUG=true
|
||||
## For agents
|
||||
|
||||
`skills/myos/SKILL.md` is a skill describing how to drive myos, with
|
||||
references on the conventions, the commands and the failure modes.
|
||||
`AGENTS.md` covers changing myos itself.
|
||||
|
||||
## Tests
|
||||
|
||||
```sh
|
||||
make test # shellspec: unit + golden (a mocked docker, no daemon needed)
|
||||
make test-golden # golden only
|
||||
make golden-record # re-record the golden expectations
|
||||
make lint # shellcheck
|
||||
```
|
||||
|
||||
If letsencrypt certificate generation fails, you can retry the generation of a staging certificate.
|
||||
|
||||
```
|
||||
$ make host-certbot-staging
|
||||
```
|
||||
|
||||
Once the certificate generation is working, you can ask for a valid certificate.
|
||||
|
||||
```
|
||||
$ make host-down
|
||||
$ docker volume rm $(hostname)
|
||||
$ make host SETUP_LETSENCRYPT=true
|
||||
```
|
||||
|
||||
* SETUP_UFW
|
||||
|
||||
Control linux firewall rules with ufw.
|
||||
|
||||
```
|
||||
$ echo SETUP_UFW=true >> .env
|
||||
$ make setup-ufw
|
||||
```
|
||||
|
||||
### Debug
|
||||
|
||||
* Show docker compose yaml config
|
||||
|
||||
```shell
|
||||
$ make config
|
||||
```
|
||||
|
||||
`make config` show docker compose yaml config for stack `STACK`
|
||||
`make host-config` show docker compose yaml config for stack `host`
|
||||
`make user-config` show docker compose yaml config for stack `User`
|
||||
`make stack-elastic-config` show docker compose yaml config for stack `elastic`
|
||||
|
||||
* Show debug variables
|
||||
|
||||
```shell
|
||||
$ make debug
|
||||
```
|
||||
|
||||
* Generate self documentation
|
||||
|
||||
```shell
|
||||
$ make doc
|
||||
```
|
||||
|
||||
* Show env args
|
||||
|
||||
```shell
|
||||
$ make print-env_args
|
||||
```
|
||||
|
||||
* Show user mail
|
||||
|
||||
```shell
|
||||
$ make print-MAIL
|
||||
```
|
||||
## License
|
||||
|
||||
GPL-3.0, see LICENSE.
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
# Restart protocol (2026-09-05)
|
||||
|
||||
The rewrite starts over from the make engine, not from `lib/`.
|
||||
|
||||
1. **Reference = `make/*` as it is**, bugs fixed one by one, each with a test
|
||||
that goes red then green. Known bugs and their locations are listed in the
|
||||
planning notes and in `git log --grep=fix` on this branch.
|
||||
2. **Tests first, against make**: every target in scope gets a functional case
|
||||
in `spec/golden/cases.txt`, recorded from the make engine
|
||||
(`spec/golden/record.sh`, `spec/support/run.sh` engine `legacy`). That
|
||||
recording is the historical behaviour, defects included.
|
||||
3. **Rewrite target by target in red/green**: the new implementation (`just`
|
||||
as the interface with line recipes, POSIX sh as the logic) must turn each
|
||||
case green under `MYOS_ENGINE=just`. A deliberate departure from the
|
||||
historical behaviour is written down in `spec/golden/DELTAS.md`.
|
||||
4. The first attempt (`bin/myos`, `lib/`, `lib/cmd/`, `share/make/shim.mk`,
|
||||
`spec/golden/expected.cli/`, `spec/unit/`) is tagged `attempt-1-lib` and is
|
||||
not a base for the rewrite. What is worth keeping from it is ideas: port
|
||||
exposure by bind address (`expose --strict`), certificates derived from the
|
||||
route tags (dehydrated), `env-update` with forward references, stack
|
||||
directories merged along the search path, lazy defaults, command chaining,
|
||||
typed exit codes, the agent skill, the installer.
|
||||
5. The catalogue readable by make is `myos-stacks@7289b83` (or `github/develop`
|
||||
here): the later hooks (`_stack.sh`) are not read by make.
|
||||
6. Scope from real fleet usage (~15 targets): up down build config logs ps
|
||||
restart status, the `host` group, print-VAR, docker-build-<image>,
|
||||
setup-ufw, install bootstrap clean, apps-install. Never used: release,
|
||||
subrepo, git-*, deploy, ssh-*.
|
||||
7. Keep and reuse: `spec/support/run.sh`, the docker mocks, the fixtures, the
|
||||
golden cases, `spec/bench/` (make 312 ms fixed + ~700 ms per stack; just
|
||||
line recipe 19 ms, shebang recipe 160 ms; shell hooks with command
|
||||
substitutions ~40 ms per computed setting on any engine).
|
||||
|
||||
Traps already paid for in POSIX sh, do not pay them again: `IFS=$'\n'` stops
|
||||
argument splitting; `for w in $list` globs a `*` (use `set -f`); `[a-z]`
|
||||
matches uppercase under fr_FR (use `[:lower:]`); a function called inside
|
||||
`$( )` cannot return through a global; an environment variable must never be
|
||||
taken for a stack group (lowercase names only); an unprefixed lazy default
|
||||
named `host` runs `/usr/bin/host`; zsh does not split unquoted variables, so
|
||||
test scripts run under `sh`.
|
||||
@@ -1,3 +0,0 @@
|
||||
389DS_REPOSITORY_URL := https://github.com/thorsten-l/389ds-docker-alpine
|
||||
389DS_VERSION := 2.4.4
|
||||
DOCKER_BUILD_ARGS += --build-arg BUILD_VERSION=$(389DS_VERSION)
|
||||
@@ -1,4 +0,0 @@
|
||||
BIONICGPT_ENVOY_SERVICE_7700_TAGS ?= $(call tagprefix)
|
||||
BIONICGPT_REPOSITORY_URL ?= https://github.com/purton-tech/bionicgpt
|
||||
BIONICGPT_VERSION ?= v1.3.3
|
||||
ENV_VARS += BIONICGPT_ENVOY_SERVICE_7700_TAGS
|
||||
@@ -1,47 +0,0 @@
|
||||
services:
|
||||
|
||||
app:
|
||||
environment:
|
||||
APP_DATABASE_URL: postgresql://${BIONICGPT_DB_APP_USER:-ft_application}:${BIONICGPT_DB_APP_PASSWORD:-testpassword}@db:5432/${BIONICGPT_DB_POSTGRES_DB:-finetuna}?sslmode=disable
|
||||
|
||||
barricade:
|
||||
environment:
|
||||
SECRET_KEY: ${BIONICGPT_BARRICADE_SECRET_KEY:-190a5bf4b3cbb6c0991967ab1c48ab30790af876720f1835cbbf3820f4f5d949}
|
||||
DATABASE_URL: postgresql://${BIONICGPT_DB_POSTGRES_USER:-postgres}:${BIONICGPT_DB_POSTGRES_PASSWORD:-testpassword}@db:5432/${BIONICGPT_DB_POSTGRES_DB:-finetuna}?sslmode=disable
|
||||
|
||||
db:
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${BIONICGPT_DB_POSTGRES_PASSWORD:-testpassword}
|
||||
POSTGRES_USER: ${BIONICGPT_DB_POSTGRES_USER:-postgres}
|
||||
POSTGRES_DB: ${BIONICGPT_DB_POSTGRES_DB:-finetuna}
|
||||
PGDATA: /var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${BIONICGPT_DB_POSTGRES_USER:-postgres}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
|
||||
pipeline-job:
|
||||
environment:
|
||||
APP_DATABASE_URL: postgresql://${BIONICGPT_DB_APP_USER:-ft_application}:${BIONICGPT_DB_APP_PASSWORD:-testpassword}@db:5432/${BIONICGPT_DB_POSTGRES_DB:-finetuna}?sslmode=disable
|
||||
|
||||
envoy:
|
||||
labels:
|
||||
- SERVICE_7700_CHECK_HTTP=${BIONICGPT_ENVOY_SERVICE_7700_CHECK_HTTP:-/auth/sign_in}
|
||||
- SERVICE_7700_NAME=${COMPOSE_SERVICE_NAME:-bionicgpt}-envoy-7700
|
||||
- SERVICE_7700_TAGS=${BIONICGPT_ENVOY_SERVICE_7700_TAGS:-urlprefix-localhost/bionicgpt/*}
|
||||
|
||||
llm-api:
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- local-ai
|
||||
|
||||
migrations:
|
||||
environment:
|
||||
DATABASE_URL: postgresql://${BIONICGPT_DB_POSTGRES_USER:-postgres}:${BIONICGPT_DB_POSTGRES_PASSWORD:-testpassword}@db:5432/${BIONICGPT_DB_POSTGRES_DB:-finetuna}?sslmode=disable
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
@@ -1,6 +0,0 @@
|
||||
ENV_VARS += SIGNOZ_FRONTEND_SERVICE_3301_TAGS
|
||||
SIGNOZ_DOCKER_DIR ?= deploy/docker/clickhouse-setup
|
||||
SIGNOZ_FRONTEND_SERVICE_3301_TAGS ?= $(call urlprefix)
|
||||
SIGNOZ_REPOSITORY_URL ?= https://github.com/SigNoz/signoz
|
||||
SIGNOZ_VERSION ?= v0.34.3
|
||||
STACK += alerting/apprise
|
||||
@@ -1,6 +0,0 @@
|
||||
services:
|
||||
frontend:
|
||||
labels:
|
||||
- SERVICE_3301_CHECK_HTTP=${SIGNOZ_SERVICE_3301_CHECK_HTTP:-/}
|
||||
- SERVICE_3301_NAME=${COMPOSE_SERVICE_NAME:-signoz}-frontend-3301
|
||||
- SERVICE_3301_TAGS=${SIGNOZ_FRONTEND_SERVICE_3301_TAGS:-urlprefix-localhost/signoz/*}
|
||||
@@ -0,0 +1,314 @@
|
||||
#!/bin/sh
|
||||
# myos - Make Your Own Stack
|
||||
#
|
||||
# shellcheck disable=SC2034 # most globals here are read by lib/ and lib/cmd/
|
||||
# shellcheck disable=SC1091 # lib files are sourced by path at runtime
|
||||
#
|
||||
# Runs docker compose stacks: on a host, in a project directory, for a user.
|
||||
# See README.md, or `myos help`.
|
||||
set -u
|
||||
|
||||
MYOS_VERSION=2.0.0-dev
|
||||
|
||||
# --- locate the installation ---------------------------------------------
|
||||
_self=$0
|
||||
while [ -L "$_self" ]; do
|
||||
_link=$(readlink "$_self")
|
||||
case $_link in /*) _self=$_link ;; *) _self=$(dirname "$_self")/$_link ;; esac
|
||||
done
|
||||
MYOS_ROOT=$(cd "$(dirname "$_self")/.." && pwd -P)
|
||||
export MYOS_ROOT
|
||||
|
||||
for _m in core str var tags naming stack config compose hooks context expose cert; do
|
||||
# shellcheck source=/dev/null
|
||||
. "$MYOS_ROOT/lib/$_m.sh"
|
||||
done
|
||||
|
||||
# myos_is_command WORD true when WORD names a command rather than a stack
|
||||
myos_is_command() {
|
||||
case $1 in
|
||||
up|down|start|stop|restart|ps|logs|config|build|pull|create|kill|top|images) return 0 ;;
|
||||
version|help|export) return 0 ;;
|
||||
print-*|stack-*-*) return 0 ;;
|
||||
*@*) myos_is_command "${1%@*}"; return $? ;;
|
||||
esac
|
||||
[ -f "$MYOS_ROOT/lib/cmd/$1.sh" ]
|
||||
}
|
||||
|
||||
# --- command line ---------------------------------------------------------
|
||||
# These are read by the lib/cmd/* files sourced further down.
|
||||
# shellcheck disable=SC2034
|
||||
{
|
||||
MYOS_CMDS=
|
||||
MYOS_REFS=
|
||||
MYOS_REFS_RAW=
|
||||
MYOS_VARS=
|
||||
MYOS_ARGS=
|
||||
MYOS_COLOR=${MYOS_COLOR:-auto}
|
||||
VERBOSE=${VERBOSE:-}
|
||||
DEBUG=${DEBUG:-}
|
||||
}
|
||||
|
||||
usage() {
|
||||
cat <<'USAGE'
|
||||
Usage: myos [options] <command> [stack...] [VAR=value...] [-- args...]
|
||||
|
||||
Options:
|
||||
-C DIR work in DIR instead of the current directory
|
||||
-e ENV environment (default: local, or ENV from the config)
|
||||
-n, --dry-run print the commands instead of running them
|
||||
--color WHEN always, never or auto (default: colour when on a terminal)
|
||||
-v, --verbose show what myos does
|
||||
-d, --debug show every command
|
||||
-h, --help this help
|
||||
|
||||
Commands:
|
||||
up down start stop restart recreate manage the containers of a stack
|
||||
ps status logs config exec run inspect and enter them
|
||||
ls [--groups] list the stacks myos can see
|
||||
env [VAR...] show resolved variables
|
||||
export every setting of the stacks, as KEY=value
|
||||
env-update fill .env from the .env.dist templates
|
||||
expose [--strict] what the stacks publish, and to whom
|
||||
cert list|issue|renew|show certificates, derived from the routes
|
||||
doctor check the installation
|
||||
version print the myos version
|
||||
|
||||
Stacks:
|
||||
myos up the stack of the current directory
|
||||
myos up host a group, expanded from host=... in a .env or .mk
|
||||
myos up host/fabio a single stack
|
||||
myos up postgres:9.6 a versioned stack
|
||||
USAGE
|
||||
}
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
-C) WORKDIR=$2; shift 2 ;;
|
||||
-e) ENV=$2; shift 2 ;;
|
||||
# running on remote hosts is not implemented yet; the flag is refused
|
||||
# rather than silently ignored
|
||||
-H) myos_die "$MYOS_E_USAGE" "-H is not implemented yet: run myos on the host itself" ;;
|
||||
-n|--dry-run) DRYRUN=true; shift ;;
|
||||
--color) MYOS_COLOR=$2; shift 2 ;;
|
||||
--color=*) MYOS_COLOR=${1#--color=}; shift ;;
|
||||
-v|--verbose) VERBOSE=true; shift ;;
|
||||
-d|--debug) DEBUG=true; shift ;;
|
||||
-h|--help) usage; exit 0 ;;
|
||||
--) shift; MYOS_ARGS="$*"; break ;;
|
||||
-*)
|
||||
if [ -n "$MYOS_CMDS" ]; then
|
||||
MYOS_ARGS="${MYOS_ARGS:+$MYOS_ARGS }$1"; shift
|
||||
else
|
||||
myos_error "unknown option: $1"; usage >&2; exit "$MYOS_E_USAGE"
|
||||
fi ;;
|
||||
*=*) eval "${1%%=*}=\${1#*=}"; export "${1%%=*}"; shift ;;
|
||||
*)
|
||||
# Leading words that name commands are commands, the rest are stacks:
|
||||
# `myos build up logs host/fabio` runs three commands on one stack, the
|
||||
# way `make build up logs STACK=host/fabio` did.
|
||||
if [ -z "$MYOS_REFS" ] && myos_is_command "$1"; then
|
||||
MYOS_CMDS="${MYOS_CMDS:+$MYOS_CMDS }$1"
|
||||
else
|
||||
MYOS_REFS="${MYOS_REFS:+$MYOS_REFS }$1"
|
||||
fi
|
||||
shift ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$MYOS_CMDS" ]; then
|
||||
if [ -n "$MYOS_REFS" ]; then
|
||||
# the first word was meant as a command; name it rather than dump the usage
|
||||
myos_error "unknown command: ${MYOS_REFS%% *}"
|
||||
myos_error "to act on a stack of that name, say what to do: myos up ${MYOS_REFS%% *}"
|
||||
exit "$MYOS_E_USAGE"
|
||||
fi
|
||||
usage
|
||||
exit "$MYOS_E_USAGE"
|
||||
fi
|
||||
MYOS_REFS_RAW=$MYOS_REFS
|
||||
|
||||
# Targets of the make engine keep working: print-VAR, stack-<stack>-<command>
|
||||
# and <command>@<env> each translate to a command of the CLI.
|
||||
_cmds=
|
||||
for _c in $MYOS_CMDS; do
|
||||
case $_c in
|
||||
*@*) ENV=${_c#*@}; _c=${_c%@*} ;;
|
||||
esac
|
||||
case $_c in
|
||||
print-*)
|
||||
MYOS_VARS="${MYOS_VARS:+$MYOS_VARS }${_c#print-}"
|
||||
# shellcheck disable=SC2209 # the literal string "env", not the command
|
||||
_c=env ;;
|
||||
stack-*-*)
|
||||
_rest=${_c#stack-}
|
||||
_c=${_rest##*-}
|
||||
MYOS_REFS="${_rest%-*}${MYOS_REFS:+ $MYOS_REFS}" ;;
|
||||
esac
|
||||
_cmds="${_cmds:+$_cmds }$_c"
|
||||
done
|
||||
MYOS_CMDS=$_cmds
|
||||
|
||||
# cert takes a subcommand where the others take only stacks
|
||||
case $MYOS_CMDS in
|
||||
*cert*)
|
||||
case ${MYOS_REFS%% *} in
|
||||
list|domains|issue|renew|show)
|
||||
MYOS_VARS=${MYOS_REFS%% *}
|
||||
case $MYOS_REFS in *' '*) MYOS_REFS=${MYOS_REFS#* } ;; *) MYOS_REFS= ;; esac ;;
|
||||
esac ;;
|
||||
esac
|
||||
|
||||
# env, ls and doctor take variable names where the others take stacks
|
||||
case $MYOS_CMDS in
|
||||
env|ls|doctor)
|
||||
[ -n "$MYOS_VARS" ] || MYOS_VARS=$MYOS_REFS
|
||||
MYOS_REFS= ;;
|
||||
esac
|
||||
|
||||
# --- configuration --------------------------------------------------------
|
||||
WORKDIR=${WORKDIR:-$PWD}
|
||||
WORKDIR=$(cd "$WORKDIR" 2>/dev/null && pwd -P) || myos_die "$MYOS_E_USAGE" "no such directory: $WORKDIR"
|
||||
|
||||
# ENV decides which .env.<env> to read, so it is resolved first, from the most
|
||||
# specific source that names it.
|
||||
if [ -z "${ENV:-}" ]; then
|
||||
for _f in "$WORKDIR/.env" "${HOME:-}/.config/myos/config" $(myos_conf_files); do
|
||||
ENV=$(myos_dotenv_parse "$_f" | sed -n 's/^ENV=//p' | tail -1)
|
||||
[ -n "$ENV" ] && break
|
||||
done
|
||||
fi
|
||||
ENV=${ENV:-local}
|
||||
|
||||
# The layers, most specific first: the loader never overwrites a value, so the
|
||||
# order below is the order of precedence. The environment and the VAR=value
|
||||
# arguments are already set, and therefore win over every file.
|
||||
# MYOS_CONF_PRIORITY=system puts the machine files first, as the make engine did.
|
||||
myos_config_layers() {
|
||||
if [ "${MYOS_CONF_PRIORITY:-}" = system ]; then
|
||||
myos_conf_files
|
||||
printf '%s\n' "${HOME:-}/.config/myos/config" "$WORKDIR/.env.$ENV" "$WORKDIR/.env"
|
||||
else
|
||||
printf '%s\n' "$WORKDIR/.env.$ENV" "$WORKDIR/.env" "${HOME:-}/.config/myos/config"
|
||||
myos_conf_files
|
||||
fi
|
||||
}
|
||||
for _f in $(myos_config_layers); do myos_dotenv_load "$_f"; done
|
||||
|
||||
# Overlay switches. Their names drive which <stack>.<suffix>.yml files load,
|
||||
# so these defaults decide that e.g. supabase.labels.yml is picked up.
|
||||
COMPOSE_FILE_APP=${COMPOSE_FILE_APP:-true}
|
||||
COMPOSE_FILE_LABELS=${COMPOSE_FILE_LABELS:-true}
|
||||
COMPOSE_FILE_NETWORKS=${COMPOSE_FILE_NETWORKS:-true}
|
||||
COMPOSE_FILE_SSH=${COMPOSE_FILE_SSH:-true}
|
||||
COMPOSE_FILE_VOLUMES=${COMPOSE_FILE_VOLUMES:-true}
|
||||
COMPOSE_FILE_DEBUG=${COMPOSE_FILE_DEBUG:-${DEBUG:+true}}
|
||||
|
||||
USER=${USER:-$(id -nu 2>/dev/null)}
|
||||
HOSTNAME=${HOSTNAME:-$(hostname 2>/dev/null | sed 's/\..*//')}
|
||||
HOSTNAME=$(myos_lower "$HOSTNAME")
|
||||
DOMAIN=${DOMAIN:-localhost}
|
||||
DOMAINNAME=${DOMAINNAME:-${DOMAIN%% *}}
|
||||
MAIL=${MAIL:-$(git config user.email 2>/dev/null || printf '%s@%s' "$USER" "$DOMAINNAME")}
|
||||
DRYRUN=${DRYRUN:-false}
|
||||
myos_colors
|
||||
|
||||
# --- stack references -----------------------------------------------------
|
||||
# No reference given: the configured STACK, else the current directory when it
|
||||
# holds a compose file. An explicit STACK always wins, so a project that pins
|
||||
# its stacks in .env keeps working from inside its own directory.
|
||||
if [ -z "$MYOS_REFS" ]; then
|
||||
if [ -n "${STACK:-}" ]; then
|
||||
MYOS_REFS=$STACK
|
||||
elif [ -f "$WORKDIR/docker-compose.yml" ] || [ -f "$WORKDIR/compose.yml" ] ||
|
||||
[ -f "$WORKDIR/docker/docker-compose.yml" ]; then
|
||||
MYOS_REFS=./
|
||||
fi
|
||||
fi
|
||||
if [ -z "$MYOS_REFS" ]; then
|
||||
# these commands describe the installation rather than act on a stack
|
||||
for _c in $MYOS_CMDS; do
|
||||
case $_c in
|
||||
env|env-update|export|expose|ls|doctor|version|help) ;;
|
||||
*) myos_die "$MYOS_E_USAGE" "no stack given, and no compose file in $WORKDIR" ;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086 # a list of references
|
||||
MYOS_STACKS=$(myos_group_expand $MYOS_REFS)
|
||||
|
||||
myos_context_defaults
|
||||
|
||||
# The uri a stack is served on: the tag helpers build on it, so it has to be
|
||||
# known before the hooks run.
|
||||
MYOS_SCOPE_FIRST=$(for _r in $MYOS_STACKS; do myos_scope "$_r"; break; done)
|
||||
MYOS_APP_FIRST=$(for _r in $MYOS_STACKS; do myos_stack_name "$_r"; break; done)
|
||||
APP_HOST=${APP_HOST:-$(myos_app_host "$MYOS_SCOPE_FIRST" "$USER" "$ENV" "$MYOS_APP_FIRST" "$DOMAINNAME" "$HOSTNAME")}
|
||||
APP_URI=${APP_URI:-$(myos_app_uri "$APP_HOST" "${APP_PATH:-}")}
|
||||
APP_SCHEME=${APP_SCHEME:-http}
|
||||
|
||||
# Per-stack hooks must run in this shell: everything downstream reads the
|
||||
# variables they set, and a command substitution would throw them away.
|
||||
for _ref in $MYOS_STACKS; do
|
||||
for _hdir in $(myos_stack_dirs "$_ref"); do
|
||||
myos_stack_hooks "$_hdir" "$(myos_stack_name "$_ref")"
|
||||
done
|
||||
done
|
||||
|
||||
# The two functions below are called from the lib/cmd/* files sourced later,
|
||||
# which shellcheck cannot see.
|
||||
# shellcheck disable=SC2329
|
||||
# myos_framework_compose_files the networks and volumes overlays myos itself
|
||||
# provides; they always come last so a stack can rely on them being there.
|
||||
myos_framework_compose_files() {
|
||||
myos_compose_files "$MYOS_ROOT/share/compose" "networks volumes" "$(myos_compose_suffixes)" "$ENV"
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2329
|
||||
# myos_stack_compose_files REF the ordered compose files of one reference
|
||||
myos_stack_compose_files() {
|
||||
_dirs=$(myos_stack_dirs "$1")
|
||||
[ -n "$_dirs" ] || { myos_stack_resolve "$1" >/dev/null; return $?; }
|
||||
_name=$(myos_stack_name "$1")
|
||||
_suffixes="$(myos_compose_suffixes) $(myos_stack_version "$1")"
|
||||
for _dir in $_dirs; do
|
||||
case $1 in
|
||||
.|./*|/*|../*)
|
||||
myos_compose_files "$_dir" "docker-compose compose" "$_suffixes" "$ENV"
|
||||
myos_compose_files "$_dir/docker" "docker-compose compose" "$_suffixes" "$ENV" ;;
|
||||
*)
|
||||
myos_compose_files "$_dir" "docker-compose $_name" "$_suffixes" "$ENV" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# --- dispatch -------------------------------------------------------------
|
||||
# myos_dispatch COMMAND run one command
|
||||
myos_dispatch() {
|
||||
case $1 in
|
||||
version) printf 'myos %s\n' "$MYOS_VERSION"; return 0 ;;
|
||||
help) usage; return 0 ;;
|
||||
esac
|
||||
if [ -f "$MYOS_ROOT/lib/cmd/$1.sh" ]; then
|
||||
# shellcheck source=/dev/null
|
||||
. "$MYOS_ROOT/lib/cmd/$1.sh"
|
||||
"myos_cmd_$(printf '%s' "$1" | tr '-' '_')"
|
||||
return $?
|
||||
fi
|
||||
# commands that map straight onto docker compose
|
||||
case $1 in
|
||||
up|down|start|stop|restart|ps|logs|config|build|pull|create|kill|top|images) ;;
|
||||
*) myos_error "unknown command: $1"; usage >&2; return "$MYOS_E_USAGE" ;;
|
||||
esac
|
||||
# shellcheck source=/dev/null
|
||||
. "$MYOS_ROOT/lib/cmd/_compose.sh"
|
||||
myos_cmd_compose "$1"
|
||||
}
|
||||
|
||||
# Several commands run in order and stop at the first failure, as make did.
|
||||
_rc=0
|
||||
for MYOS_CMD in $MYOS_CMDS; do
|
||||
myos_dispatch "$MYOS_CMD" || { _rc=$?; break; }
|
||||
done
|
||||
exit "$_rc"
|
||||
@@ -1,62 +0,0 @@
|
||||
# from: https://github.com/thorsten-l/389ds-docker-alpine
|
||||
FROM --platform=$BUILDPLATFORM alpine:3.19 as builder
|
||||
ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
RUN echo "*** BUILDPLATFORM=$BUILDPLATFORM TARGETPLATFORM=$TARGETPLATFORM"
|
||||
|
||||
ARG BUILD_VERSION
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
RUN apk add build-base wget libtool autoconf automake openssl-dev cracklib-dev \
|
||||
libevent-dev nspr-dev nss-dev openldap-dev db-dev icu-dev \
|
||||
net-snmp-dev krb5-dev pcre-dev make rsync nss-tools openssl \
|
||||
linux-pam-dev python3 py3-pip python3-dev git py3-setuptools \
|
||||
py3-argcomplete py3-ldap3 py3-dateutil lmdb-dev json-c-dev pcre2-dev
|
||||
|
||||
RUN if [ "$TARGETPLATFORM" != "linux/arm/v7" ]; then apk add rust cargo ; fi
|
||||
|
||||
RUN mkdir /build
|
||||
WORKDIR /build
|
||||
RUN wget "https://github.com/389ds/389-ds-base/archive/refs/tags/389-ds-base-$BUILD_VERSION.tar.gz"
|
||||
RUN tar xvfz "389-ds-base-$BUILD_VERSION.tar.gz"
|
||||
WORKDIR "/build/389-ds-base-389-ds-base-$BUILD_VERSION"
|
||||
|
||||
RUN ./autogen.sh
|
||||
RUN if [ "$TARGETPLATFORM" != "linux/arm/v7" ]; then ./configure --with-openldap --enable-rust ; fi
|
||||
RUN if [ "$TARGETPLATFORM" == "linux/arm/v7" ]; then ./configure --with-openldap; fi
|
||||
|
||||
RUN sed -e 's/.*build_manpages.*/\tcd \$\(srcdir\)\/src\/lib389\; \$\(PYTHON\) setup.py build/g' Makefile > M
|
||||
RUN mv M Makefile
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/setup.py src/lib389/setup.py
|
||||
|
||||
RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
||||
&& apk add zig@testing
|
||||
|
||||
RUN make -j 8 && make lib389 -j 8 && make install && make lib389-install
|
||||
|
||||
FROM alpine:3.19
|
||||
|
||||
RUN apk add openssl cracklib libevent nspr nss openldap db icu \
|
||||
net-snmp krb5 pcre nss-tools openssl linux-pam python3 \
|
||||
lmdb json-c pcre2 elfutils libffi libexpat
|
||||
|
||||
COPY --from=builder /opt /opt
|
||||
COPY --from=builder /usr/sbin/ds* /usr/sbin/
|
||||
COPY --from=builder /usr/lib/python3.10 /usr/lib/python3.10
|
||||
COPY --from=builder /usr/libexec/dirsrv /usr/libexec/dirsrv
|
||||
|
||||
RUN mkdir -p /data /data/config /data/run /opt/dirsrv/var/run/dirsrv; \
|
||||
ln -s /data/run /opt/dirsrv/var/run/dirsrv; \
|
||||
ln -s /data/ssca /opt/dirsrv/etc/dirsrv/ssca; \
|
||||
ln -s /data/config /opt/dirsrv/etc/dirsrv/slapd-localhost
|
||||
|
||||
HEALTHCHECK --start-period=5m --timeout=5s --interval=5s --retries=2 \
|
||||
CMD /usr/libexec/dirsrv/dscontainer -H
|
||||
|
||||
WORKDIR /data
|
||||
VOLUME /data
|
||||
|
||||
EXPOSE 3389 3636
|
||||
|
||||
CMD [ "/usr/libexec/dirsrv/dscontainer", "-r" ]
|
||||
@@ -1,86 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
# --- BEGIN COPYRIGHT BLOCK ---
|
||||
# Copyright (C) 2018 Red Hat, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# License: GPL (version 3 or any later version).
|
||||
# See LICENSE for details.
|
||||
# --- END COPYRIGHT BLOCK ---
|
||||
|
||||
#
|
||||
# A setup.py file
|
||||
#
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
from os import path
|
||||
|
||||
from setuptools.command.build_py import build_py
|
||||
|
||||
here = path.abspath(path.dirname(__file__))
|
||||
|
||||
# fedora/rhel versioning or PEP440?; ATM semantic versioning
|
||||
# with open(path.join(here, 'VERSION'), 'r') as version_file:
|
||||
# version = version_file.read().strip()
|
||||
|
||||
version = "1.4.0.1"
|
||||
|
||||
with open(path.join(here, 'README.md'), 'r') as f:
|
||||
long_description = f.read()
|
||||
|
||||
setup(
|
||||
name='lib389',
|
||||
license='GPLv3+',
|
||||
version=version,
|
||||
description='A library for accessing and configuring the 389 Directory ' +
|
||||
'Server',
|
||||
long_description=long_description,
|
||||
url='http://www.port389.org/docs/389ds/FAQ/upstream-test-framework.html',
|
||||
|
||||
author='Red Hat Inc., and William Brown',
|
||||
author_email='389-devel@lists.fedoraproject.org',
|
||||
|
||||
classifiers=[
|
||||
'Development Status :: 4 - Beta',
|
||||
'Intended Audience :: Developers',
|
||||
'Operating System :: POSIX :: Linux',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Topic :: Software Development :: Libraries',
|
||||
'Topic :: Software Development :: Quality Assurance',
|
||||
'Topic :: Software Development :: Testing'],
|
||||
|
||||
keywords='389 directory server test configure',
|
||||
packages=find_packages(exclude=['tests*']),
|
||||
|
||||
# find lib389/clitools -name ds\* -exec echo \''{}'\', \;
|
||||
data_files=[
|
||||
('/usr/sbin/', [
|
||||
'cli/dsctl',
|
||||
'cli/dsconf',
|
||||
'cli/dscreate',
|
||||
'cli/dsidm',
|
||||
'cli/openldap_to_ds',
|
||||
]),
|
||||
('/usr/libexec/dirsrv/', [
|
||||
'cli/dscontainer',
|
||||
]),
|
||||
],
|
||||
|
||||
install_requires=[
|
||||
'pyasn1',
|
||||
'pyasn1-modules',
|
||||
'python-dateutil',
|
||||
'argcomplete',
|
||||
'argparse-manpage',
|
||||
'python-ldap',
|
||||
'setuptools',
|
||||
'distro',
|
||||
],
|
||||
|
||||
cmdclass={
|
||||
}
|
||||
|
||||
)
|
||||
@@ -1,42 +0,0 @@
|
||||
FROM alpine:latest as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
|
||||
RUN apk --no-cache add \
|
||||
ansible \
|
||||
py3-pip \
|
||||
&& pip3 install boto
|
||||
|
||||
RUN apk --no-cache upgrade
|
||||
|
||||
ENTRYPOINT ["/usr/bin/ansible"]
|
||||
CMD ["--help"]
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG UID
|
||||
ARG USER
|
||||
ENV UID=${UID}
|
||||
ENV GID=${UID}
|
||||
ENV USER=${USER}
|
||||
|
||||
# If we provide a numeric UID
|
||||
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
||||
# Remove user with $UID if it is not our $USER
|
||||
&& if [ "$(getent passwd $UID |awk -F: '{print $1}')" != "$USER" ]; then \
|
||||
sed -i '/^'$(getent passwd $UID |awk -F: '{print $1}')':x:'$UID':/d' /etc/passwd; \
|
||||
sed -i '/^'$(getent group $GID |awk -F: '{print $1}')':x:'$GID':/d' /etc/group; \
|
||||
fi \
|
||||
# Force $UID if our $USER already exists
|
||||
&& sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \
|
||||
&& sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \
|
||||
# Create $USER if it does not exist
|
||||
&& if [ "$(getent passwd $UID)" = "" ]; then \
|
||||
echo "$USER:x:$UID:$GID::/home/$USER:$SHELL" >> /etc/passwd; \
|
||||
echo "$USER:\!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \
|
||||
echo "$USER:x:$GID:" >> /etc/group; \
|
||||
fi \
|
||||
&& mkdir -p /home/$USER \
|
||||
&& chown $UID:$GID /home/$USER \
|
||||
|| true
|
||||
|
||||
USER $USER
|
||||
@@ -1,32 +0,0 @@
|
||||
FROM nimmis/alpine-apache-php5
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
RUN apk add --no-cache \
|
||||
memcached \
|
||||
php5-bz2 \
|
||||
php5-enchant \
|
||||
php5-gmp \
|
||||
php5-imap \
|
||||
php5-ldap \
|
||||
php5-memcache \
|
||||
php5-mssql \
|
||||
php5-mysqli \
|
||||
php5-opcache \
|
||||
php5-pdo \
|
||||
php5-pdo_mysql \
|
||||
php5-pdo_pgsql \
|
||||
php5-pdo_sqlite \
|
||||
php5-pspell \
|
||||
php5-snmp \
|
||||
php5-xcache \
|
||||
php5-xmlrpc \
|
||||
php5-xsl
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/apache-php5-config.sh /etc/run_always/51-config-apache
|
||||
COPY ${DOCKER_BUILD_DIR}/php.ini /etc/php5/
|
||||
COPY ${DOCKER_BUILD_DIR}/header.php /etc/php5/
|
||||
|
||||
RUN mkdir -p /etc/sv/memcached \
|
||||
&& echo -e '#!/bin/sh\n\nexec 2>&1\nexec chpst -u apache /usr/bin/memcached -s /var/tmp/memcached\n' > /etc/sv/memcached/run \
|
||||
&& chmod +x /etc/sv/memcached/run \
|
||||
&& ln -s ../sv/memcached /etc/service/memcached
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
DOCUMENT_ROOT=${DOCUMENT_ROOT:-/web/html}
|
||||
LOAD_MODULE=${LOAD_MODULE:-env expires headers remoteip reqtimeout rewrite setenvif slotmem_shm vhost_alias}
|
||||
PREFIX=${PREFIX:-/web/config}
|
||||
SERVER_NAME=${SERVER_NAME:-$(hostname)}
|
||||
VIRTUAL_ROOT=${VIRTUAL_ROOT:-%0}
|
||||
|
||||
sed -E -i \
|
||||
-e 's!^#?\s*(LoadModule ('${LOAD_MODULE// /|}')_module modules/mod_('${LOAD_MODULE// /|}').so)\s*!\1!g' \
|
||||
-e 's!^ServerName .*!ServerName '${SERVER_NAME}'!g' \
|
||||
-e 's!^ServerSignature .*!ServerSignature Off!g' \
|
||||
-e 's!DocumentRoot .*!DocumentRoot "'${DOCUMENT_ROOT}'"!; /DocumentRoot/,/Directory/{s!Directory .*"!Directory "'${DOCUMENT_ROOT}'"!}' \
|
||||
"$PREFIX/httpd.conf"
|
||||
sed -ni \
|
||||
-e '/^VirtualDocumentRoot/!p;$a VirtualDocumentRoot '"${DOCUMENT_ROOT}/${VIRTUAL_ROOT:-%-1/%-2/%-3}"'' \
|
||||
"$PREFIX/conf.d/default.conf"
|
||||
sed -i \
|
||||
-e 's!internal!localhost!g' \
|
||||
-e 's!^Alias .*!Alias "/localhost" "'${DOCUMENT_ROOT}'/localhost"!g; /Alias/,/Directory/{s!Directory .*"!Directory "'${DOCUMENT_ROOT}/localhost'"!}' \
|
||||
"$PREFIX/conf.d/errordocs.conf"
|
||||
@@ -1,33 +0,0 @@
|
||||
<?php
|
||||
if( PHP_SAPI != 'cli' ) {
|
||||
if( $_SERVER["HTTP_X_FORWARDED_PROTO"] == 'https' )
|
||||
$_SERVER["SERVER_PORT"] = 443;
|
||||
else
|
||||
$_SERVER["SERVER_PORT"] = 80;
|
||||
}
|
||||
function error_handler() {
|
||||
$error = error_get_last();
|
||||
if ($error) switch ($error['type']) {
|
||||
case E_ERROR: // 1
|
||||
readfile("/var/www/html/500.html");
|
||||
break;
|
||||
case E_PARSE: // 4
|
||||
case E_CORE_ERROR: // 16
|
||||
case E_CORE_WARNING: // 32
|
||||
case E_COMPILE_ERROR: // 64
|
||||
case E_COMPILE_WARNING: // 128
|
||||
case E_USER_ERROR: // 256
|
||||
case E_RECOVERABLE_ERROR: // 4096
|
||||
readfile("/var/www/html/50x.html");
|
||||
break;
|
||||
case E_WARNING: // 2
|
||||
case E_NOTICE: // 8
|
||||
case E_USER_WARNING: // 512
|
||||
case E_USER_NOTICE: // 1024
|
||||
case E_STRICT: // 2048
|
||||
case E_DEPRECATED: // 8192
|
||||
case E_USER_DEPRECATED: // 16384
|
||||
}
|
||||
}
|
||||
register_shutdown_function('error_handler');
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,43 +0,0 @@
|
||||
FROM alpine:latest as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
|
||||
RUN apk --no-cache add \
|
||||
groff \
|
||||
less \
|
||||
py-pip3 \
|
||||
&& pip3 install awscli
|
||||
|
||||
RUN apk --no-cache upgrade
|
||||
|
||||
ENTRYPOINT ["/usr/bin/aws"]
|
||||
CMD ["help"]
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG UID
|
||||
ARG USER
|
||||
ENV UID=${UID}
|
||||
ENV GID=${UID}
|
||||
ENV USER=${USER}
|
||||
|
||||
# If we provide a numeric UID
|
||||
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
||||
# Remove user with $UID if it is not our $USER
|
||||
&& if [ "$(getent passwd $UID |awk -F: '{print $1}')" != "$USER" ]; then \
|
||||
sed -i '/^'$(getent passwd $UID |awk -F: '{print $1}')':x:'$UID':/d' /etc/passwd; \
|
||||
sed -i '/^'$(getent group $GID |awk -F: '{print $1}')':x:'$GID':/d' /etc/group; \
|
||||
fi \
|
||||
# Force $UID if our $USER already exists
|
||||
&& sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \
|
||||
&& sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \
|
||||
# Create $USER if it does not exist
|
||||
&& if [ "$(getent passwd $UID)" = "" ]; then \
|
||||
echo "$USER:x:$UID:$GID::/home/$USER:$SHELL" >> /etc/passwd; \
|
||||
echo "$USER:\!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \
|
||||
echo "$USER:x:$GID:" >> /etc/group; \
|
||||
fi \
|
||||
&& mkdir -p /home/$USER \
|
||||
&& chown $UID:$GID /home/$USER \
|
||||
|| true
|
||||
|
||||
USER $USER
|
||||
@@ -1,62 +0,0 @@
|
||||
FROM python:3.11-alpine as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG CERTBOT_VERSION=1.32.0
|
||||
|
||||
# RUN pip install \
|
||||
RUN apk --no-cache add --virtual .build-deps \
|
||||
augeas-dev \
|
||||
build-base \
|
||||
libffi-dev \
|
||||
&& pip install \
|
||||
acme==$CERTBOT_VERSION \
|
||||
certbot==$CERTBOT_VERSION \
|
||||
# certbot-apache \
|
||||
certbot-dns-azure \
|
||||
# certbot-dns-bunny \
|
||||
certbot-dns-clouddns \
|
||||
certbot-dns-cloudflare \
|
||||
certbot-dns-cloudxns \
|
||||
certbot-dns-digitalocean \
|
||||
certbot-dns-dnsmadeeasy \
|
||||
certbot-dns-dnsimple \
|
||||
# certbot-dns-gehirn \
|
||||
certbot-dns-godaddy \
|
||||
certbot-dns-google \
|
||||
certbot-dns-infomaniak \
|
||||
# certbot-dns-inwx \
|
||||
certbot-dns-ispconfig \
|
||||
certbot-dns-lightsail \
|
||||
certbot-dns-linode \
|
||||
certbot-dns-luadns \
|
||||
certbot-dns-njalla \
|
||||
# certbot-dns-nsone \
|
||||
certbot-dns-ovh \
|
||||
certbot-dns-rfc2136 \
|
||||
certbot-dns-route53 \
|
||||
# certbot-dns-sakuracloud \
|
||||
certbot-dns-standalone \
|
||||
certbot-dns-yandexcloud \
|
||||
# certbot-ext-auth future \
|
||||
certbot-nginx \
|
||||
certbot-plugin-gandi \
|
||||
certbot-s3front \
|
||||
certbot_dns_duckdns \
|
||||
certbot_dns_porkbun \
|
||||
# letsencrypt-pritunl \
|
||||
# letsencrypt-proxmox \
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner --recursive /usr \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
| xargs -r apk info --installed \
|
||||
| sort -u \
|
||||
)" \
|
||||
&& apk del .build-deps \
|
||||
&& apk add --no-cache --virtual .run-deps $runDeps
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/certbot-renew /etc/periodic/daily/
|
||||
COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["--help"]
|
||||
|
||||
FROM dist as master
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p /etc/letsencrypt/renewal
|
||||
/usr/local/bin/certbot renew > /etc/letsencrypt/renewal/letsencrypt.log
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
set -euo errexit
|
||||
|
||||
[ -n "${DEBUG:-}" -a "${DEBUG:-}" != "false" ] && set -x
|
||||
|
||||
case "${1:-start}" in
|
||||
|
||||
start)
|
||||
exec /usr/sbin/crond -f -L/dev/stdout
|
||||
;;
|
||||
|
||||
*)
|
||||
exec /usr/local/bin/certbot "$@"
|
||||
;;
|
||||
|
||||
esac
|
||||
@@ -1,20 +0,0 @@
|
||||
FROM alpine:latest as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
ARG COMPOSE_REMOTE=https://github.com/docker/compose
|
||||
ARG COMPOSE_VERSION=2.5.0
|
||||
ARG DOCKER_MACHINE=x86_64
|
||||
ARG DOCKER_SYSTEM=Linux
|
||||
|
||||
RUN apk update \
|
||||
&& apk add --no-cache ca-certificates \
|
||||
&& OS="$(echo ${DOCKER_SYSTEM} |awk '{print tolower($0)}')" \
|
||||
&& ARCH="$(echo ${DOCKER_MACHINE} |awk '{print /armv7l/ ? "armv7" : $0}')" \
|
||||
&& wget -qO /usr/bin/docker-compose ${COMPOSE_REMOTE}/releases/download/v${COMPOSE_VERSION}/docker-compose-${OS}-${ARCH} \
|
||||
&& chmod +x /usr/bin/docker-compose
|
||||
|
||||
ENTRYPOINT ["/usr/bin/docker-compose"]
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
@@ -1,23 +0,0 @@
|
||||
ARG CONSUL_VERSION=1.11.1
|
||||
FROM consul:${CONSUL_VERSION} as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG DOCKER_GID=999
|
||||
|
||||
# add user consul in group docker
|
||||
RUN DOCKER_GROUP=$(awk -F: '$3 == '${DOCKER_GID}' {print $1}' < /etc/group) \
|
||||
&& if [ -n "${DOCKER_GROUP}" ]; then adduser consul ${DOCKER_GROUP}; \
|
||||
else addgroup -g ${DOCKER_GID} docker && adduser consul docker; \
|
||||
fi
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/docker-healthcheck /usr/local/bin/
|
||||
RUN chmod +rx /usr/local/bin/docker-healthcheck
|
||||
|
||||
HEALTHCHECK CMD ((((echo -e 'GET /v1/health/service/consul HTTP/1.0\n' \
|
||||
|nc -w 1 localhost:8500; echo $? >&3) \
|
||||
|sed -n '/^\[/,$p' \
|
||||
|jq '.[].Checks[0].Output' >&4) 3>&1) \
|
||||
| (read err; exit $err)) 4>&1
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/bin/sh
|
||||
# link: https://github.com/hashicorp/consul/issues/3182
|
||||
# author: Yann "aya" Autissier
|
||||
# license: GPL
|
||||
set -eu
|
||||
|
||||
DOCKER_SOCK=${DOCKER_SOCK:-/var/run/docker.sock}
|
||||
|
||||
if ! which curl > /dev/null || ! which jq >/dev/null; then
|
||||
>&2 echo "ERROR: curl or jq not found"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
>&2 echo "ERROR: invalid parameter '$*'"
|
||||
echo "USAGE: $0 container-id|container-name|container-ip"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
{
|
||||
{
|
||||
{
|
||||
# list all dockers
|
||||
for docker in $(curl --disable --fail --show-error --silent --unix-socket "${DOCKER_SOCK}" http://localhost/containers/json |jq -r '.[].Id'); do
|
||||
# print "health_status id name ip_address health_output" for each docker
|
||||
curl --disable --fail --show-error --silent --unix-socket "${DOCKER_SOCK}" "http://localhost/containers/${docker}/json" \
|
||||
|jq -r '[.State.Health.Status, .Id, .Name, .NetworkSettings.IPAddress, .State.Health.Log[0].Output] |@tsv'
|
||||
# shorten id: .Id |capture("(?<id>.{12})").id
|
||||
# print "health_status" and "health_output" for line matching $1
|
||||
done |awk -F '\t' '/\<'"$1"'\>/ {print $1 | "cat >&3; exec 3>&-"; print $NF | "cat >&4";}'
|
||||
} 3>&1
|
||||
} | {
|
||||
read -r status ||:
|
||||
case "$status" in
|
||||
healthy) exit=0;;
|
||||
starting) exit=1;;
|
||||
*) exit=2;;
|
||||
esac
|
||||
# exit according to "health_status"
|
||||
exit $exit
|
||||
}
|
||||
# print "health_output"
|
||||
} 4>&1
|
||||
@@ -1,9 +0,0 @@
|
||||
FROM docker.elastic.co/apm/apm-server-oss:7.4.2 as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
# config
|
||||
COPY ${DOCKER_BUILD_DIR}/apm-server.yml /usr/share/apm-server/
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
@@ -1,931 +0,0 @@
|
||||
######################### APM Server Configuration #########################
|
||||
|
||||
################################ APM Server ################################
|
||||
|
||||
apm-server:
|
||||
# Defines the host and port the server is listening on. Use "unix:/path/to.sock" to listen on a unix domain socket.
|
||||
host: "0.0.0.0:8200"
|
||||
|
||||
# Maximum permitted size in bytes of a request's header accepted by the server to be processed.
|
||||
#max_header_size: 1048576
|
||||
|
||||
# Maximum amount of time to wait for the next incoming request before underlying connection is closed.
|
||||
#idle_timeout: 45s
|
||||
|
||||
# Maximum permitted duration for reading an entire request.
|
||||
#read_timeout: 30s
|
||||
|
||||
# Maximum permitted duration for writing a response.
|
||||
#write_timeout: 30s
|
||||
|
||||
# Maximum duration before releasing resources when shutting down the server.
|
||||
#shutdown_timeout: 5s
|
||||
|
||||
# Maximum permitted size in bytes of an event accepted by the server to be processed.
|
||||
#max_event_size: 307200
|
||||
|
||||
# Maximum number of new connections to accept simultaneously (0 means unlimited).
|
||||
#max_connections: 0
|
||||
|
||||
# Authorization token for sending data to the APM server. If a token is set, the
|
||||
# agents must send it in the following format: Authorization: Bearer <secret-token>.
|
||||
# It is recommended to use an authorization token in combination with SSL enabled,
|
||||
# and save the token in the apm-server keystore. The token is not used for the RUM endpoint.
|
||||
#secret_token:
|
||||
|
||||
# Enable secure communication between APM agents and the server. By default ssl is disabled.
|
||||
#ssl:
|
||||
#enabled: false
|
||||
|
||||
# Configure a list of root certificate authorities for verifying client certificates.
|
||||
#certificate_authorities: []
|
||||
|
||||
# Path to file containing the certificate for server authentication.
|
||||
# Needs to be configured when ssl is enabled.
|
||||
#certificate: ''
|
||||
|
||||
# Path to file containing server certificate key.
|
||||
# Needs to be configured when ssl is enabled.
|
||||
#key: ''
|
||||
|
||||
# Optional configuration options for ssl communication.
|
||||
|
||||
# Passphrase for decrypting the Certificate Key.
|
||||
# It is recommended to use the provided keystore instead of entering the passphrase in plain text.
|
||||
#key_passphrase: ''
|
||||
|
||||
# List of supported/valid protocol versions. By default TLS versions 1.1 up to 1.2 are enabled.
|
||||
#supported_protocols: [TLSv1.1, TLSv1.2]
|
||||
|
||||
# Configure cipher suites to be used for SSL connections.
|
||||
#cipher_suites: []
|
||||
|
||||
# Configure curve types for ECDHE based cipher suites.
|
||||
#curve_types: []
|
||||
|
||||
# Configure which type of client authentication is supported.
|
||||
# Options are `none`, `optional`, and `required`. Default is `optional`.
|
||||
#client_authentication: "optional"
|
||||
|
||||
# Configure SSL verification mode. If `none` is configured, all hosts and
|
||||
# certificates will be accepted. In this mode, SSL-based connections are
|
||||
# susceptible to man-in-the-middle attacks. Use only for testing. Default is `full`.
|
||||
#ssl.verification_mode: full
|
||||
|
||||
# Enable Real User Monitoring (RUM) Support. By default RUM is disabled.
|
||||
#rum:
|
||||
#enabled: false
|
||||
|
||||
#event_rate:
|
||||
|
||||
# Defines the maximum amount of events allowed to be sent to the APM Server RUM
|
||||
# endpoint per IP per second. Defaults to 300.
|
||||
#limit: 300
|
||||
|
||||
# An LRU cache is used to keep a rate limit per IP for the most recently seen IPs.
|
||||
# This setting defines the number of unique IPs that can be tracked in the cache.
|
||||
# Sites with many concurrent clients should consider increasing this limit. Defaults to 1000.
|
||||
#lru_size: 1000
|
||||
|
||||
#-- General RUM settings
|
||||
|
||||
# Comma separated list of permitted origins for real user monitoring.
|
||||
# User-agents will send an origin header that will be validated against this list.
|
||||
# An origin is made of a protocol scheme, host and port, without the url path.
|
||||
# Allowed origins in this setting can have * to match anything (eg.: http://*.example.com)
|
||||
# If an item in the list is a single '*', everything will be allowed.
|
||||
#allow_origins : ['*']
|
||||
|
||||
# Regexp to be matched against a stacktrace frame's `file_name` and `abs_path` attributes.
|
||||
# If the regexp matches, the stacktrace frame is considered to be a library frame.
|
||||
#library_pattern: "node_modules|bower_components|~"
|
||||
|
||||
# Regexp to be matched against a stacktrace frame's `file_name`.
|
||||
# If the regexp matches, the stacktrace frame is not used for calculating error groups.
|
||||
# The default pattern excludes stacktrace frames that have a filename starting with '/webpack'
|
||||
#exclude_from_grouping: "^/webpack"
|
||||
|
||||
# If a source map has previously been uploaded, source mapping is automatically applied.
|
||||
# to all error and transaction documents sent to the RUM endpoint.
|
||||
#source_mapping:
|
||||
|
||||
# Sourcemapping is enabled by default.
|
||||
#enabled: true
|
||||
|
||||
# Source maps are always fetched from Elasticsearch, by default using the output.elasticsearch configuration.
|
||||
# A different instance must be configured when using any other output.
|
||||
# This setting only affects sourcemap reads - the output determines where sourcemaps are written.
|
||||
#elasticsearch:
|
||||
# Array of hosts to connect to.
|
||||
# Scheme and port can be left out and will be set to the default (`http` and `9200`).
|
||||
# In case you specify and additional path, the scheme is required: `http://localhost:9200/path`.
|
||||
# IPv6 addresses should always be defined as: `https://[2001:db8::1]:9200`.
|
||||
# hosts: ["localhost:9200"]
|
||||
|
||||
# Optional protocol and basic auth credentials.
|
||||
#protocol: "https"
|
||||
#username: "elastic"
|
||||
#password: "changeme"
|
||||
|
||||
# The `cache.expiration` determines how long a source map should be cached before fetching it again from Elasticsearch.
|
||||
# Note that values configured without a time unit will be interpreted as seconds.
|
||||
#cache:
|
||||
#expiration: 5m
|
||||
|
||||
# Source maps are stored in a separate index.
|
||||
# If the default index pattern for source maps at 'outputs.elasticsearch.indices'
|
||||
# is changed, a matching index pattern needs to be specified here.
|
||||
#index_pattern: "apm-*-sourcemap*"
|
||||
|
||||
|
||||
# If true (default), APM Server captures the IP of the instrumented service
|
||||
# or the IP and User Agent of the real user (RUM requests).
|
||||
#capture_personal_data: true
|
||||
|
||||
# Enable APM Server Golang expvar support (https://golang.org/pkg/expvar/).
|
||||
#expvar:
|
||||
#enabled: false
|
||||
|
||||
# Url to expose expvar.
|
||||
#url: "/debug/vars"
|
||||
|
||||
# Instrumentation support for the server's HTTP endpoints and event publisher.
|
||||
#instrumentation:
|
||||
# Set to true to enable instrumentation of the APM Server itself.
|
||||
#enabled: false
|
||||
|
||||
# Environment in which the APM Server is running on (eg: staging, production, etc.)
|
||||
#environment: ""
|
||||
|
||||
# Remote hosts to report instrumentation results to.
|
||||
#hosts:
|
||||
# - http://remote-apm-server:8200
|
||||
|
||||
# secret_token for the remote apm-servers.
|
||||
#secret_token:
|
||||
|
||||
# A pipeline is a definition of processors applied to documents when ingesting them to Elasticsearch.
|
||||
# Using pipelines involves two steps:
|
||||
# (1) registering a pipeline
|
||||
# (2) applying a pipeline during data ingestion (see `output.elasticsearch.pipeline`)
|
||||
#
|
||||
# You can manually register a pipeline, or use this configuration option to ensure
|
||||
# the pipeline is loaded and registered at the configured Elasticsearch instances.
|
||||
# Find the default pipeline configuration at `ingest/pipeline/definition.json`.
|
||||
# Automatic pipeline registration requires the `output.elasticsearch` to be enabled and configured.
|
||||
#register.ingest.pipeline:
|
||||
# Registers APM pipeline definition in Elasticsearch on APM Server startup. Defaults to true.
|
||||
#enabled: true
|
||||
# Overwrites existing APM pipeline definition in Elasticsearch. Defaults to false.
|
||||
#overwrite: false
|
||||
|
||||
# When ilm is set to `auto`, the APM Server checks a couple of preconditions:
|
||||
# If a different output than Elasticsearch is configured, ILM will be disabled.
|
||||
# If Elasticsearch output is configured, but specific `index` or `indices` settings are configured, ILM will be
|
||||
# disabled, as it only works with default index settings.
|
||||
# If the configured Elasticsearch instance is not eligible for ILM, ILM will also be disabled.
|
||||
# If all preconditions are met, ILM will be enabled.
|
||||
#
|
||||
# When ILM is set to `true`, the APM Server ignores any configured index settings.
|
||||
# For ILM to be applied, The configured output must be set to Elasticsearch and the instance
|
||||
# needs to support ILM. Otherwise APM Server falls back to ordinary index management without ILM.
|
||||
#
|
||||
# Defaults to "auto". Disable ILM by setting it to `false`.
|
||||
#ilm.enabled: "auto"
|
||||
|
||||
# When using APM agent configuration, information fetched from Kibana will be cached in memory for some time.
|
||||
# Specify cache key expiration via this setting. Default is 30 seconds.
|
||||
#agent.config.cache.expiration: 30s
|
||||
|
||||
#kibana:
|
||||
# For APM Agent configuration in Kibana, enabled must be true.
|
||||
#enabled: false
|
||||
|
||||
# Scheme and port can be left out and will be set to the default (`http` and `5601`).
|
||||
# In case you specify an additional path, the scheme is required: `http://localhost:5601/path`.
|
||||
# IPv6 addresses should always be defined as: `https://[2001:db8::1]:5601`.
|
||||
#host: "localhost:5601"
|
||||
|
||||
# Optional protocol and basic auth credentials.
|
||||
#protocol: "https"
|
||||
#username: "elastic"
|
||||
#password: "changeme"
|
||||
|
||||
# Optional HTTP path.
|
||||
#path: ""
|
||||
|
||||
# Enable custom SSL settings. Set to false to ignore custom SSL settings for secure communication.
|
||||
#ssl.enabled: true
|
||||
|
||||
# Optional SSL configuration options. SSL is off by default, change the `protocol` option if you want to enable `https`.
|
||||
# Configure SSL verification mode. If `none` is configured, all server hosts
|
||||
# and certificates will be accepted. In this mode, SSL based connections are
|
||||
# susceptible to man-in-the-middle attacks. Use only for testing. Default is
|
||||
# `full`.
|
||||
#ssl.verification_mode: full
|
||||
|
||||
# List of supported/valid TLS versions. By default all TLS versions 1.0 up to
|
||||
# 1.2 are enabled.
|
||||
#ssl.supported_protocols: [TLSv1.0, TLSv1.1, TLSv1.2]
|
||||
|
||||
# List of root certificates for HTTPS server verifications.
|
||||
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
|
||||
|
||||
# Certificate for SSL client authentication.
|
||||
#ssl.certificate: "/etc/pki/client/cert.pem"
|
||||
|
||||
# Client Certificate Key
|
||||
#ssl.key: "/etc/pki/client/cert.key"
|
||||
|
||||
# Optional passphrase for decrypting the Certificate Key.
|
||||
# It is recommended to use the provided keystore instead of entering the passphrase in plain text.
|
||||
#ssl.key_passphrase: ''
|
||||
|
||||
# Configure cipher suites to be used for SSL connections.
|
||||
#ssl.cipher_suites: []
|
||||
|
||||
# Configure curve types for ECDHE based cipher suites.
|
||||
#ssl.curve_types: []
|
||||
|
||||
#================================= General =================================
|
||||
|
||||
# Data is buffered in a memory queue before it is published to the configured output.
|
||||
# The memory queue will present all available events (up to the outputs
|
||||
# bulk_max_size) to the output, the moment the output is ready to serve
|
||||
# another batch of events.
|
||||
#queue:
|
||||
# Queue type by name (default 'mem').
|
||||
#mem:
|
||||
# Max number of events the queue can buffer.
|
||||
#events: 4096
|
||||
|
||||
# Hints the minimum number of events stored in the queue,
|
||||
# before providing a batch of events to the outputs.
|
||||
# The default value is set to 2048.
|
||||
# A value of 0 ensures events are immediately available
|
||||
# to be sent to the outputs.
|
||||
#flush.min_events: 2048
|
||||
|
||||
# Maximum duration after which events are available to the outputs,
|
||||
# if the number of events stored in the queue is < `flush.min_events`.
|
||||
#flush.timeout: 1s
|
||||
|
||||
# Sets the maximum number of CPUs that can be executing simultaneously. The
|
||||
# default is the number of logical CPUs available in the system.
|
||||
#max_procs:
|
||||
|
||||
#================================= Template =================================
|
||||
|
||||
# A template is used to set the mapping in Elasticsearch.
|
||||
# By default template loading is enabled and the template is loaded.
|
||||
# These settings can be adjusted to load your own template or overwrite existing ones.
|
||||
|
||||
# Set to false to disable template loading.
|
||||
#setup.template.enabled: true
|
||||
|
||||
# Template name. By default the template name is "apm-%{[observer.version]}"
|
||||
# The template name and pattern has to be set in case the elasticsearch index pattern is modified.
|
||||
#setup.template.name: "apm-%{[observer.version]}"
|
||||
|
||||
# Template pattern. By default the template pattern is "apm-%{[observer.version]}-*" to apply to the default index settings.
|
||||
# The first part is the version of apm-server and then -* is used to match all daily indices.
|
||||
# The template name and pattern has to be set in case the elasticsearch index pattern is modified.
|
||||
#setup.template.pattern: "apm-%{[observer.version]}-*"
|
||||
|
||||
# Path to fields.yml file to generate the template.
|
||||
#setup.template.fields: "${path.config}/fields.yml"
|
||||
|
||||
# Overwrite existing template.
|
||||
#setup.template.overwrite: false
|
||||
|
||||
# Elasticsearch template settings.
|
||||
#setup.template.settings:
|
||||
|
||||
# A dictionary of settings to place into the settings.index dictionary
|
||||
# of the Elasticsearch template. For more details, please check
|
||||
# https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html
|
||||
#index:
|
||||
#number_of_shards: 1
|
||||
#codec: best_compression
|
||||
#number_of_routing_shards: 30
|
||||
#mapping.total_fields.limit: 2000
|
||||
|
||||
#============================= Elastic Cloud =============================
|
||||
|
||||
# These settings simplify using APM Server with the Elastic Cloud (https://cloud.elastic.co/).
|
||||
|
||||
# The cloud.id setting overwrites the `output.elasticsearch.hosts` option.
|
||||
# You can find the `cloud.id` in the Elastic Cloud web UI.
|
||||
#cloud.id:
|
||||
|
||||
# The cloud.auth setting overwrites the `output.elasticsearch.username` and
|
||||
# `output.elasticsearch.password` settings. The format is `<user>:<pass>`.
|
||||
#cloud.auth:
|
||||
|
||||
#================================ Outputs =================================
|
||||
|
||||
# Configure the output to use when sending the data collected by apm-server.
|
||||
|
||||
#-------------------------- Elasticsearch output --------------------------
|
||||
output.elasticsearch:
|
||||
# Array of hosts to connect to.
|
||||
# Scheme and port can be left out and will be set to the default (`http` and `9200`).
|
||||
# In case you specify and additional path, the scheme is required: `http://localhost:9200/path`.
|
||||
# IPv6 addresses should always be defined as: `https://[2001:db8::1]:9200`.
|
||||
hosts: ["elasticsearch:9200"]
|
||||
|
||||
# Boolean flag to enable or disable the output module.
|
||||
#enabled: true
|
||||
|
||||
# Set gzip compression level.
|
||||
#compression_level: 0
|
||||
|
||||
# Optional protocol and basic auth credentials.
|
||||
#protocol: "https"
|
||||
#username: "elastic"
|
||||
#password: "changeme"
|
||||
|
||||
# Dictionary of HTTP parameters to pass within the url with index operations.
|
||||
#parameters:
|
||||
#param1: value1
|
||||
#param2: value2
|
||||
|
||||
# Number of workers per Elasticsearch host.
|
||||
#worker: 1
|
||||
|
||||
# By using the configuration below, APM documents are stored to separate indices,
|
||||
# depending on their `processor.event`:
|
||||
# - error
|
||||
# - transaction
|
||||
# - span
|
||||
# - sourcemap
|
||||
#
|
||||
# The indices are all prefixed with `apm-%{[observer.version]}`.
|
||||
# To allow managing indices based on their age, all indices (except for sourcemaps)
|
||||
# end with the information of the day they got indexed.
|
||||
# e.g. "apm-7.3.0-transaction-2019.07.20"
|
||||
#
|
||||
# Be aware that you can only specify one Elasticsearch template.
|
||||
# If you modify the index patterns you must also update these configurations accordingly,
|
||||
# as they need to be aligned:
|
||||
# * `setup.template.name`
|
||||
# * `setup.template.pattern`
|
||||
#index: "apm-%{[observer.version]}-%{+yyyy.MM.dd}"
|
||||
#indices:
|
||||
# - index: "apm-%{[observer.version]}-sourcemap"
|
||||
# when.contains:
|
||||
# processor.event: "sourcemap"
|
||||
#
|
||||
# - index: "apm-%{[observer.version]}-error-%{+yyyy.MM.dd}"
|
||||
# when.contains:
|
||||
# processor.event: "error"
|
||||
#
|
||||
# - index: "apm-%{[observer.version]}-transaction-%{+yyyy.MM.dd}"
|
||||
# when.contains:
|
||||
# processor.event: "transaction"
|
||||
#
|
||||
# - index: "apm-%{[observer.version]}-span-%{+yyyy.MM.dd}"
|
||||
# when.contains:
|
||||
# processor.event: "span"
|
||||
#
|
||||
# - index: "apm-%{[observer.version]}-metric-%{+yyyy.MM.dd}"
|
||||
# when.contains:
|
||||
# processor.event: "metric"
|
||||
#
|
||||
# - index: "apm-%{[observer.version]}-onboarding-%{+yyyy.MM.dd}"
|
||||
# when.contains:
|
||||
# processor.event: "onboarding"
|
||||
|
||||
# A pipeline is a definition of processors applied to documents when ingesting them to Elasticsearch.
|
||||
# APM Server comes with a default pipeline definition, located at `ingest/pipeline/definition.json`, which is
|
||||
# loaded to Elasticsearch by default (see `apm-server.register.ingest.pipeline`).
|
||||
# APM pipeline is enabled by default. To disable it, set `pipeline: _none`.
|
||||
#pipeline: "apm"
|
||||
|
||||
# Optional HTTP Path.
|
||||
#path: "/elasticsearch"
|
||||
|
||||
# Custom HTTP headers to add to each request.
|
||||
#headers:
|
||||
# X-My-Header: Contents of the header
|
||||
|
||||
# Proxy server url.
|
||||
#proxy_url: http://proxy:3128
|
||||
|
||||
# The number of times a particular Elasticsearch index operation is attempted. If
|
||||
# the indexing operation doesn't succeed after this many retries, the events are
|
||||
# dropped. The default is 3.
|
||||
#max_retries: 3
|
||||
|
||||
# The maximum number of events to bulk in a single Elasticsearch bulk API index request.
|
||||
# The default is 50.
|
||||
#bulk_max_size: 50
|
||||
|
||||
# The number of seconds to wait before trying to reconnect to Elasticsearch
|
||||
# after a network error. After waiting backoff.init seconds, apm-server
|
||||
# tries to reconnect. If the attempt fails, the backoff timer is increased
|
||||
# exponentially up to backoff.max. After a successful connection, the backoff
|
||||
# timer is reset. The default is 1s.
|
||||
#backoff.init: 1s
|
||||
|
||||
# The maximum number of seconds to wait before attempting to connect to
|
||||
# Elasticsearch after a network error. The default is 60s.
|
||||
#backoff.max: 60s
|
||||
|
||||
# Configure http request timeout before failing an request to Elasticsearch.
|
||||
#timeout: 90
|
||||
|
||||
# Enable custom SSL settings. Set to false to ignore custom SSL settings for secure communication.
|
||||
#ssl.enabled: true
|
||||
|
||||
# Optional SSL configuration options. SSL is off by default, change the `protocol` option if you want to enable `https`.
|
||||
# Configure SSL verification mode. If `none` is configured, all server hosts
|
||||
# and certificates will be accepted. In this mode, SSL based connections are
|
||||
# susceptible to man-in-the-middle attacks. Use only for testing. Default is
|
||||
# `full`.
|
||||
#ssl.verification_mode: full
|
||||
|
||||
# List of supported/valid TLS versions. By default all TLS versions 1.0 up to
|
||||
# 1.2 are enabled.
|
||||
#ssl.supported_protocols: [TLSv1.0, TLSv1.1, TLSv1.2]
|
||||
|
||||
# List of root certificates for HTTPS server verifications.
|
||||
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
|
||||
|
||||
# Certificate for SSL client authentication.
|
||||
#ssl.certificate: "/etc/pki/client/cert.pem"
|
||||
|
||||
# Client Certificate Key
|
||||
#ssl.key: "/etc/pki/client/cert.key"
|
||||
|
||||
# Optional passphrase for decrypting the Certificate Key.
|
||||
# It is recommended to use the provided keystore instead of entering the passphrase in plain text.
|
||||
#ssl.key_passphrase: ''
|
||||
|
||||
# Configure cipher suites to be used for SSL connections.
|
||||
#ssl.cipher_suites: []
|
||||
|
||||
# Configure curve types for ECDHE based cipher suites.
|
||||
#ssl.curve_types: []
|
||||
|
||||
# Configure what types of renegotiation are supported. Valid options are
|
||||
# never, once, and freely. Default is never.
|
||||
#ssl.renegotiation: never
|
||||
|
||||
#----------------------------- Console output -----------------------------
|
||||
#output.console:
|
||||
# Boolean flag to enable or disable the output module.
|
||||
#enabled: false
|
||||
|
||||
# Configure JSON encoding.
|
||||
#codec.json:
|
||||
# Pretty-print JSON event.
|
||||
#pretty: false
|
||||
|
||||
# Configure escaping HTML symbols in strings.
|
||||
#escape_html: false
|
||||
|
||||
#---------------------------- Logstash output -----------------------------
|
||||
#output.logstash:
|
||||
# Boolean flag to enable or disable the output module.
|
||||
#enabled: false
|
||||
|
||||
# The Logstash hosts.
|
||||
#hosts: ["localhost:5044"]
|
||||
|
||||
# Number of workers per Logstash host.
|
||||
#worker: 1
|
||||
|
||||
# Set gzip compression level.
|
||||
#compression_level: 3
|
||||
|
||||
# Configure escaping html symbols in strings.
|
||||
#escape_html: true
|
||||
|
||||
# Optional maximum time to live for a connection to Logstash, after which the
|
||||
# connection will be re-established. A value of `0s` (the default) will
|
||||
# disable this feature.
|
||||
#
|
||||
# Not yet supported for async connections (i.e. with the "pipelining" option set).
|
||||
#ttl: 30s
|
||||
|
||||
# Optional load balance the events between the Logstash hosts. Default is false.
|
||||
#loadbalance: false
|
||||
|
||||
# Number of batches to be sent asynchronously to Logstash while processing
|
||||
# new batches.
|
||||
#pipelining: 2
|
||||
|
||||
# If enabled only a subset of events in a batch of events is transferred per
|
||||
# group. The number of events to be sent increases up to `bulk_max_size`
|
||||
# if no error is encountered.
|
||||
#slow_start: false
|
||||
|
||||
# The number of seconds to wait before trying to reconnect to Logstash
|
||||
# after a network error. After waiting backoff.init seconds, apm-server
|
||||
# tries to reconnect. If the attempt fails, the backoff timer is increased
|
||||
# exponentially up to backoff.max. After a successful connection, the backoff
|
||||
# timer is reset. The default is 1s.
|
||||
#backoff.init: 1s
|
||||
|
||||
# The maximum number of seconds to wait before attempting to connect to
|
||||
# Logstash after a network error. The default is 60s.
|
||||
#backoff.max: 60s
|
||||
|
||||
# Optional index name. The default index name is set to apm
|
||||
# in all lowercase.
|
||||
#index: 'apm'
|
||||
|
||||
# SOCKS5 proxy server URL
|
||||
#proxy_url: socks5://user:password@socks5-server:2233
|
||||
|
||||
# Resolve names locally when using a proxy server. Defaults to false.
|
||||
#proxy_use_local_resolver: false
|
||||
|
||||
# Enable SSL support. SSL is automatically enabled if any SSL setting is set.
|
||||
#ssl.enabled: false
|
||||
|
||||
# Optional SSL configuration options. SSL is off by default.
|
||||
# Configure SSL verification mode. If `none` is configured, all server hosts
|
||||
# and certificates will be accepted. In this mode, SSL based connections are
|
||||
# susceptible to man-in-the-middle attacks. Use only for testing. Default is
|
||||
# `full`.
|
||||
#ssl.verification_mode: full
|
||||
|
||||
# List of supported/valid TLS versions. By default all TLS versions 1.0 up to
|
||||
# 1.2 are enabled.
|
||||
#ssl.supported_protocols: [TLSv1.0, TLSv1.1, TLSv1.2]
|
||||
|
||||
# List of root certificates for HTTPS server verifications.
|
||||
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
|
||||
|
||||
# Certificate for SSL client authentication.
|
||||
#ssl.certificate: "/etc/pki/client/cert.pem"
|
||||
|
||||
# Client Certificate Key
|
||||
#ssl.key: "/etc/pki/client/cert.key"
|
||||
|
||||
# Optional passphrase for decrypting the Certificate Key.
|
||||
# It is recommended to use the provided keystore instead of entering the passphrase in plain text.
|
||||
#ssl.key_passphrase: ''
|
||||
|
||||
# Configure cipher suites to be used for SSL connections.
|
||||
#ssl.cipher_suites: []
|
||||
|
||||
# Configure curve types for ECDHE based cipher suites.
|
||||
#ssl.curve_types: []
|
||||
|
||||
# Configure what types of renegotiation are supported. Valid options are
|
||||
# never, once, and freely. Default is never.
|
||||
#ssl.renegotiation: never
|
||||
|
||||
#------------------------------ Kafka output ------------------------------
|
||||
#output.kafka:
|
||||
# Boolean flag to enable or disable the output module.
|
||||
#enabled: false
|
||||
|
||||
# The list of Kafka broker addresses from where to fetch the cluster metadata.
|
||||
# The cluster metadata contain the actual Kafka brokers events are published
|
||||
# to.
|
||||
#hosts: ["localhost:9092"]
|
||||
|
||||
# The Kafka topic used for produced events. The setting can be a format string
|
||||
# using any event field. To set the topic from document type use `%{[type]}`.
|
||||
#topic: beats
|
||||
|
||||
# The Kafka event key setting. Use format string to create unique event key.
|
||||
# By default no event key will be generated.
|
||||
#key: ''
|
||||
|
||||
# The Kafka event partitioning strategy. Default hashing strategy is `hash`
|
||||
# using the `output.kafka.key` setting or randomly distributes events if
|
||||
# `output.kafka.key` is not configured.
|
||||
#partition.hash:
|
||||
# If enabled, events will only be published to partitions with reachable
|
||||
# leaders. Default is false.
|
||||
#reachable_only: false
|
||||
|
||||
# Configure alternative event field names used to compute the hash value.
|
||||
# If empty `output.kafka.key` setting will be used.
|
||||
# Default value is empty list.
|
||||
#hash: []
|
||||
|
||||
# Authentication details. Password is required if username is set.
|
||||
#username: ''
|
||||
#password: ''
|
||||
|
||||
# Kafka version libbeat is assumed to run against. Defaults to the "1.0.0".
|
||||
#version: '1.0.0'
|
||||
|
||||
# Configure JSON encoding.
|
||||
#codec.json:
|
||||
# Pretty print json event
|
||||
#pretty: false
|
||||
|
||||
# Configure escaping html symbols in strings.
|
||||
#escape_html: true
|
||||
|
||||
# Metadata update configuration. Metadata do contain leader information
|
||||
# deciding which broker to use when publishing.
|
||||
#metadata:
|
||||
# Max metadata request retry attempts when cluster is in middle of leader
|
||||
# election. Defaults to 3 retries.
|
||||
#retry.max: 3
|
||||
|
||||
# Waiting time between retries during leader elections. Default is 250ms.
|
||||
#retry.backoff: 250ms
|
||||
|
||||
# Refresh metadata interval. Defaults to every 10 minutes.
|
||||
#refresh_frequency: 10m
|
||||
|
||||
# The number of concurrent load-balanced Kafka output workers.
|
||||
#worker: 1
|
||||
|
||||
# The number of times to retry publishing an event after a publishing failure.
|
||||
# After the specified number of retries, the events are typically dropped.
|
||||
# Set max_retries to a value less than 0 to retry
|
||||
# until all events are published. The default is 3.
|
||||
#max_retries: 3
|
||||
|
||||
# The maximum number of events to bulk in a single Kafka request. The default
|
||||
# is 2048.
|
||||
#bulk_max_size: 2048
|
||||
|
||||
# The number of seconds to wait for responses from the Kafka brokers before
|
||||
# timing out. The default is 30s.
|
||||
#timeout: 30s
|
||||
|
||||
# The maximum duration a broker will wait for number of required ACKs. The
|
||||
# default is 10s.
|
||||
#broker_timeout: 10s
|
||||
|
||||
# The number of messages buffered for each Kafka broker. The default is 256.
|
||||
#channel_buffer_size: 256
|
||||
|
||||
# The keep-alive period for an active network connection. If 0s, keep-alives
|
||||
# are disabled. The default is 0 seconds.
|
||||
#keep_alive: 0
|
||||
|
||||
# Sets the output compression codec. Must be one of none, snappy and gzip. The
|
||||
# default is gzip.
|
||||
#compression: gzip
|
||||
|
||||
# Set the compression level. Currently only gzip provides a compression level
|
||||
# between 0 and 9. The default value is chosen by the compression algorithm.
|
||||
#compression_level: 4
|
||||
|
||||
# The maximum permitted size of JSON-encoded messages. Bigger messages will be
|
||||
# dropped. The default value is 1000000 (bytes). This value should be equal to
|
||||
# or less than the broker's message.max.bytes.
|
||||
#max_message_bytes: 1000000
|
||||
|
||||
# The ACK reliability level required from broker. 0=no response, 1=wait for
|
||||
# local commit, -1=wait for all replicas to commit. The default is 1. Note:
|
||||
# If set to 0, no ACKs are returned by Kafka. Messages might be lost silently
|
||||
# on error.
|
||||
#required_acks: 1
|
||||
|
||||
# The configurable ClientID used for logging, debugging, and auditing
|
||||
# purposes. The default is "beats".
|
||||
#client_id: beats
|
||||
|
||||
# Enable SSL support. SSL is automatically enabled if any SSL setting is set.
|
||||
#ssl.enabled: false
|
||||
|
||||
# Optional SSL configuration options. SSL is off by default.
|
||||
# Configure SSL verification mode. If `none` is configured, all server hosts
|
||||
# and certificates will be accepted. In this mode, SSL based connections are
|
||||
# susceptible to man-in-the-middle attacks. Use only for testing. Default is
|
||||
# `full`.
|
||||
#ssl.verification_mode: full
|
||||
|
||||
# List of supported/valid TLS versions. By default all TLS versions 1.0 up to
|
||||
# 1.2 are enabled.
|
||||
#ssl.supported_protocols: [TLSv1.0, TLSv1.1, TLSv1.2]
|
||||
|
||||
# List of root certificates for HTTPS server verifications.
|
||||
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
|
||||
|
||||
# Certificate for SSL client authentication.
|
||||
#ssl.certificate: "/etc/pki/client/cert.pem"
|
||||
|
||||
# Client Certificate Key
|
||||
#ssl.key: "/etc/pki/client/cert.key"
|
||||
|
||||
# Optional passphrase for decrypting the Certificate Key.
|
||||
# It is recommended to use the provided keystore instead of entering the passphrase in plain text.
|
||||
#ssl.key_passphrase: ''
|
||||
|
||||
# Configure cipher suites to be used for SSL connections.
|
||||
#ssl.cipher_suites: []
|
||||
|
||||
# Configure curve types for ECDHE based cipher suites.
|
||||
#ssl.curve_types: []
|
||||
|
||||
# Configure what types of renegotiation are supported. Valid options are
|
||||
# never, once, and freely. Default is never.
|
||||
#ssl.renegotiation: never
|
||||
|
||||
#================================= Paths ==================================
|
||||
|
||||
# The home path for the apm-server installation. This is the default base path
|
||||
# for all other path settings and for miscellaneous files that come with the
|
||||
# distribution.
|
||||
# If not set by a CLI flag or in the configuration file, the default for the
|
||||
# home path is the location of the binary.
|
||||
#path.home:
|
||||
|
||||
# The configuration path for the apm-server installation. This is the default
|
||||
# base path for configuration files, including the main YAML configuration file
|
||||
# and the Elasticsearch template file. If not set by a CLI flag or in the
|
||||
# configuration file, the default for the configuration path is the home path.
|
||||
#path.config: ${path.home}
|
||||
|
||||
# The data path for the apm-server installation. This is the default base path
|
||||
# for all the files in which apm-server needs to store its data. If not set by a
|
||||
# CLI flag or in the configuration file, the default for the data path is a data
|
||||
# subdirectory inside the home path.
|
||||
#path.data: ${path.home}/data
|
||||
|
||||
# The logs path for an apm-server installation. If not set by a CLI flag or in the
|
||||
# configuration file, the default is a logs subdirectory inside the home path.
|
||||
#path.logs: ${path.home}/logs
|
||||
|
||||
#================================= Logging =================================
|
||||
|
||||
# There are three options for the log output: syslog, file, and stderr.
|
||||
# Windows systems default to file output. All other systems default to syslog.
|
||||
|
||||
# Sets the minimum log level. The default log level is info.
|
||||
# Available log levels are: error, warning, info, or debug.
|
||||
#logging.level: info
|
||||
|
||||
# Enable debug output for selected components. To enable all selectors use ["*"].
|
||||
# Other available selectors are "beat", "publish", or "service".
|
||||
# Multiple selectors can be chained.
|
||||
#logging.selectors: [ ]
|
||||
|
||||
# Send all logging output to syslog. The default is false.
|
||||
#logging.to_syslog: true
|
||||
|
||||
# If enabled, apm-server periodically logs its internal metrics that have changed
|
||||
# in the last period. For each metric that changed, the delta from the value at
|
||||
# the beginning of the period is logged. Also, the total values for
|
||||
# all non-zero internal metrics are logged on shutdown. The default is false.
|
||||
#logging.metrics.enabled: false
|
||||
|
||||
# The period after which to log the internal metrics. The default is 30s.
|
||||
#logging.metrics.period: 30s
|
||||
|
||||
# Logging to rotating files. When true, writes all logging output to files.
|
||||
# The log files are automatically rotated when the log file size limit is reached.
|
||||
#logging.to_files: true
|
||||
#logging.files:
|
||||
# Configure the path where the logs are written. The default is the logs directory
|
||||
# under the home path (the binary location).
|
||||
#path: /var/log/apm-server
|
||||
|
||||
# The name of the files where the logs are written to.
|
||||
#name: apm-server
|
||||
|
||||
# Configure log file size limit. If limit is reached, log file will be
|
||||
# automatically rotated.
|
||||
#rotateeverybytes: 10485760 # = 10MB
|
||||
|
||||
# Number of rotated log files to keep. Oldest files will be deleted first.
|
||||
#keepfiles: 7
|
||||
|
||||
# The permissions mask to apply when rotating log files. The default value is 0600.
|
||||
# Must be a valid Unix-style file permissions mask expressed in octal notation.
|
||||
#permissions: 0600
|
||||
|
||||
# Enable log file rotation on time intervals in addition to size-based rotation.
|
||||
# Intervals must be at least 1s. Values of 1m, 1h, 24h, 7*24h, 30*24h, and 365*24h
|
||||
# are boundary-aligned with minutes, hours, days, weeks, months, and years as
|
||||
# reported by the local system clock. All other intervals are calculated from the
|
||||
# Unix epoch. Defaults to disabled.
|
||||
#interval: 0
|
||||
|
||||
# Set to true to log messages in json format.
|
||||
#logging.json: false
|
||||
|
||||
#=============================== HTTP Endpoint ===============================
|
||||
|
||||
# apm-server can expose internal metrics through a HTTP endpoint. For security
|
||||
# reasons the endpoint is disabled by default. This feature is currently experimental.
|
||||
# Stats can be access through http://localhost:5066/stats. For pretty JSON output
|
||||
# append ?pretty to the URL.
|
||||
|
||||
# Defines if the HTTP endpoint is enabled.
|
||||
#http.enabled: false
|
||||
|
||||
# The HTTP endpoint will bind to this hostname or IP address. It is recommended to use only localhost.
|
||||
#http.host: localhost
|
||||
|
||||
# Port on which the HTTP endpoint will bind. Default is 5066.
|
||||
#http.port: 5066
|
||||
|
||||
#============================= X-pack Monitoring =============================
|
||||
|
||||
# APM server can export internal metrics to a central Elasticsearch monitoring
|
||||
# cluster. This requires x-pack monitoring to be enabled in Elasticsearch. The
|
||||
# reporting is disabled by default.
|
||||
|
||||
# Set to true to enable the monitoring reporter.
|
||||
#monitoring.enabled: false
|
||||
|
||||
# Most settings from the Elasticsearch output are accepted here as well.
|
||||
# Note that these settings should be configured to point to your Elasticsearch *monitoring* cluster.
|
||||
# Any setting that is not set is automatically inherited from the Elasticsearch
|
||||
# output configuration. This means that if you have the Elasticsearch output configured,
|
||||
# you can simply uncomment the following line.
|
||||
#monitoring.elasticsearch:
|
||||
|
||||
# Optional protocol and basic auth credentials.
|
||||
#protocol: "https"
|
||||
#username: "apm_system"
|
||||
#password: ""
|
||||
|
||||
# Array of hosts to connect to.
|
||||
# Scheme and port can be left out and will be set to the default (`http` and `9200`).
|
||||
# In case you specify and additional path, the scheme is required: `http://localhost:9200/path`.
|
||||
# IPv6 addresses should always be defined as: `https://[2001:db8::1]:9200`.
|
||||
#hosts: ["localhost:9200"]
|
||||
|
||||
# Set gzip compression level.
|
||||
#compression_level: 0
|
||||
|
||||
# Dictionary of HTTP parameters to pass within the URL with index operations.
|
||||
#parameters:
|
||||
#param1: value1
|
||||
#param2: value2
|
||||
|
||||
# Custom HTTP headers to add to each request.
|
||||
#headers:
|
||||
# X-My-Header: Contents of the header
|
||||
|
||||
# Proxy server url.
|
||||
#proxy_url: http://proxy:3128
|
||||
|
||||
# The number of times a particular Elasticsearch index operation is attempted. If
|
||||
# the indexing operation doesn't succeed after this many retries, the events are
|
||||
# dropped. The default is 3.
|
||||
#max_retries: 3
|
||||
|
||||
# The maximum number of events to bulk in a single Elasticsearch bulk API index request.
|
||||
# The default is 50.
|
||||
#bulk_max_size: 50
|
||||
|
||||
# The number of seconds to wait before trying to reconnect to Elasticsearch
|
||||
# after a network error. After waiting backoff.init seconds, apm-server
|
||||
# tries to reconnect. If the attempt fails, the backoff timer is increased
|
||||
# exponentially up to backoff.max. After a successful connection, the backoff
|
||||
# timer is reset. The default is 1s.
|
||||
#backoff.init: 1s
|
||||
|
||||
# The maximum number of seconds to wait before attempting to connect to
|
||||
# Elasticsearch after a network error. The default is 60s.
|
||||
#backoff.max: 60s
|
||||
|
||||
# Configure HTTP request timeout before failing an request to Elasticsearch.
|
||||
#timeout: 90
|
||||
|
||||
# Enable custom SSL settings. Set to false to ignore custom SSL settings for secure communication.
|
||||
#ssl.enabled: true
|
||||
|
||||
# Optional SSL configuration options. SSL is off by default, change the `protocol` option if you want to enable `https`.
|
||||
# Configure SSL verification mode. If `none` is configured, all server hosts
|
||||
# and certificates will be accepted. In this mode, SSL based connections are
|
||||
# susceptible to man-in-the-middle attacks. Use only for testing. Default is
|
||||
# `full`.
|
||||
#ssl.verification_mode: full
|
||||
|
||||
# List of supported/valid TLS versions. By default all TLS versions 1.0 up to
|
||||
# 1.2 are enabled.
|
||||
#ssl.supported_protocols: [TLSv1.0, TLSv1.1, TLSv1.2]
|
||||
|
||||
# List of root certificates for HTTPS server verifications.
|
||||
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
|
||||
|
||||
# Certificate for SSL client authentication.
|
||||
#ssl.certificate: "/etc/pki/client/cert.pem"
|
||||
|
||||
# Client Certificate Key
|
||||
#ssl.key: "/etc/pki/client/cert.key"
|
||||
|
||||
# Optional passphrase for decrypting the Certificate Key.
|
||||
# It is recommended to use the provided keystore instead of entering the passphrase in plain text.
|
||||
#ssl.key_passphrase: ''
|
||||
|
||||
# Configure cipher suites to be used for SSL connections.
|
||||
#ssl.cipher_suites: []
|
||||
|
||||
# Configure curve types for ECDHE based cipher suites.
|
||||
#ssl.curve_types: []
|
||||
|
||||
# Configure what types of renegotiation are supported. Valid options are
|
||||
# never, once, and freely. Default is never.
|
||||
#ssl.renegotiation: never
|
||||
|
||||
#metrics.period: 10s
|
||||
#state.period: 1m
|
||||
@@ -1,30 +0,0 @@
|
||||
apm-server:
|
||||
host: "0.0.0.0:8200"
|
||||
|
||||
output.elasticsearch:
|
||||
pipeline: _none
|
||||
#index: "apm-%{[observer.version]}-%{+yyyy.MM.dd}"
|
||||
#indices:
|
||||
# - index: "apm-%{[observer.version]}-sourcemap"
|
||||
# when.contains:
|
||||
# processor.event: "sourcemap"
|
||||
#
|
||||
# - index: "apm-%{[observer.version]}-error-%{+yyyy.MM.dd}"
|
||||
# when.contains:
|
||||
# processor.event: "error"
|
||||
#
|
||||
# - index: "apm-%{[observer.version]}-transaction-%{+yyyy.MM.dd}"
|
||||
# when.contains:
|
||||
# processor.event: "transaction"
|
||||
#
|
||||
# - index: "apm-%{[observer.version]}-span-%{+yyyy.MM.dd}"
|
||||
# when.contains:
|
||||
# processor.event: "span"
|
||||
#
|
||||
# - index: "apm-%{[observer.version]}-metric-%{+yyyy.MM.dd}"
|
||||
# when.contains:
|
||||
# processor.event: "metric"
|
||||
#
|
||||
# - index: "apm-%{[observer.version]}-onboarding-%{+yyyy.MM.dd}"
|
||||
# when.contains:
|
||||
# processor.event: "onboarding"
|
||||
@@ -1,98 +0,0 @@
|
||||
[
|
||||
{
|
||||
"_id": "5f08a870-7c6a-11e7-aa55-3b0d52c71c60",
|
||||
"_migrationVersion": {
|
||||
"dashboard": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "c618e4e0-7c69-11e7-aa55-3b0d52c71c60",
|
||||
"name": "panel_0",
|
||||
"type": "visualization"
|
||||
},
|
||||
{
|
||||
"id": "ceefd050-7c6a-11e7-aa55-3b0d52c71c60",
|
||||
"name": "panel_1",
|
||||
"type": "search"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"description": "",
|
||||
"hits": 0,
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"version\":true,\"highlightAll\":true}"
|
||||
},
|
||||
"optionsJSON": "{\"darkTheme\": false}",
|
||||
"panelsJSON": "[{\"size_x\":12,\"size_y\":3,\"panelIndex\":1,\"col\":1,\"row\":1,\"panelRefName\":\"panel_0\"},{\"sort\":[\"@timestamp\",\"desc\"],\"size_x\":12,\"size_y\":21,\"panelIndex\":2,\"col\":1,\"columns\":[\"error.culprit\",\"error.exception.type\",\"error.exception.message\",\"error.log.message\",\"error.exception.handled\",\"service.name\"],\"row\":4,\"panelRefName\":\"panel_1\"}]",
|
||||
"timeRestore": false,
|
||||
"title": "[APM] Error Details",
|
||||
"uiStateJSON": "{}",
|
||||
"version": 1
|
||||
},
|
||||
"_type": "dashboard"
|
||||
},
|
||||
{
|
||||
"_id": "c618e4e0-7c69-11e7-aa55-3b0d52c71c60",
|
||||
"_migrationVersion": {
|
||||
"visualization": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "apm-*",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
|
||||
"type": "index-pattern"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"description": "",
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"
|
||||
},
|
||||
"title": "Error Occurrences [APM]",
|
||||
"uiStateJSON": "{}",
|
||||
"version": 1,
|
||||
"visState": "{\"params\":{\"time_field\":\"@timestamp\",\"series\":[{\"line_width\":\"0\",\"terms_field\":\"error.grouping_key\",\"point_size\":1,\"color\":\"rgba(0,156,224,1)\",\"label\":\"Occurrences\",\"metrics\":[{\"type\":\"count\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\"}],\"seperate_axis\":0,\"split_mode\":\"terms\",\"chart_type\":\"bar\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"number\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"fill\":\"1\"}],\"axis_formatter\":\"number\",\"interval\":\">=1m\",\"filter\":\"processor.event:error\",\"show_legend\":0,\"show_grid\":1,\"axis_position\":\"left\",\"type\":\"timeseries\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\"},\"type\":\"metrics\",\"aggs\":[],\"title\":\"Error Occurrences [APM]\"}"
|
||||
},
|
||||
"_type": "visualization"
|
||||
},
|
||||
{
|
||||
"_id": "ceefd050-7c6a-11e7-aa55-3b0d52c71c60",
|
||||
"_migrationVersion": {
|
||||
"search": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "apm-*",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
|
||||
"type": "index-pattern"
|
||||
},
|
||||
{
|
||||
"id": "apm-*",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index",
|
||||
"type": "index-pattern"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"columns": [
|
||||
"error.culprit",
|
||||
"error.exception.type",
|
||||
"error.exception.message",
|
||||
"error.log.message",
|
||||
"error.exception.handled",
|
||||
"service.name"
|
||||
],
|
||||
"description": "",
|
||||
"hits": 0,
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"filter\":[{\"query\":{\"match\":{\"processor.event\":{\"query\":\"error\",\"type\":\"phrase\"}}},\"meta\":{\"value\":\"error\",\"disabled\":false,\"alias\":null,\"params\":{\"query\":\"error\",\"type\":\"phrase\"},\"key\":\"processor.event\",\"negate\":false,\"type\":\"phrase\",\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"$state\":{\"store\":\"appState\"}}],\"version\":true,\"highlightAll\":true,\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"
|
||||
},
|
||||
"sort": [
|
||||
"@timestamp",
|
||||
"desc"
|
||||
],
|
||||
"title": "Error Details [APM]",
|
||||
"version": 1
|
||||
},
|
||||
"_type": "search"
|
||||
}
|
||||
]
|
||||
@@ -1,82 +0,0 @@
|
||||
[
|
||||
{
|
||||
"_id": "37f6fac0-7c6a-11e7-aa55-3b0d52c71c60",
|
||||
"_migrationVersion": {
|
||||
"dashboard": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "22518e70-7c69-11e7-aa55-3b0d52c71c60",
|
||||
"name": "panel_0",
|
||||
"type": "visualization"
|
||||
},
|
||||
{
|
||||
"id": "c618e4e0-7c69-11e7-aa55-3b0d52c71c60",
|
||||
"name": "panel_1",
|
||||
"type": "visualization"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"description": "",
|
||||
"hits": 0,
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"version\":true,\"highlightAll\":true}"
|
||||
},
|
||||
"optionsJSON": "{\"darkTheme\": false}",
|
||||
"panelsJSON": "[{\"size_x\":12,\"size_y\":10,\"panelIndex\":1,\"col\":1,\"row\":4,\"panelRefName\":\"panel_0\"},{\"size_x\":12,\"size_y\":3,\"panelIndex\":2,\"col\":1,\"row\":1,\"panelRefName\":\"panel_1\"}]",
|
||||
"timeRestore": false,
|
||||
"title": "[APM] Errors",
|
||||
"uiStateJSON": "{\"P-1\": {\"vis\": {\"params\": {\"sort\": {\"columnIndex\": null, \"direction\": null}}}}}",
|
||||
"version": 1
|
||||
},
|
||||
"_type": "dashboard"
|
||||
},
|
||||
{
|
||||
"_id": "22518e70-7c69-11e7-aa55-3b0d52c71c60",
|
||||
"_migrationVersion": {
|
||||
"visualization": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "apm-*",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
|
||||
"type": "index-pattern"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"description": "",
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"
|
||||
},
|
||||
"title": "Top Errors for Time Period [APM]",
|
||||
"uiStateJSON": "{\"vis\": {\"params\": {\"sort\": {\"columnIndex\": null, \"direction\": null}}}}",
|
||||
"version": 1,
|
||||
"visState": "{\"title\":\"Top Errors for Time Period [APM]\",\"type\":\"table\",\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null},\"perPage\":25,\"showPartialRows\":false,\"totalFunc\":\"sum\",\"showTotal\":false,\"showMetricsAtAllLevels\":false,\"dimensions\":{\"metrics\":[{\"accessor\":1,\"format\":{\"id\":\"string\"},\"params\":{},\"aggType\":\"top_hits\"},{\"accessor\":2,\"format\":{\"id\":\"number\"},\"params\":{},\"aggType\":\"count\"},{\"accessor\":3,\"format\":{\"id\":\"string\"},\"params\":{},\"aggType\":\"top_hits\"},{\"accessor\":4,\"format\":{\"id\":\"string\"},\"params\":{},\"aggType\":\"top_hits\"},{\"accessor\":5,\"format\":{\"id\":\"string\"},\"params\":{},\"aggType\":\"top_hits\"}],\"buckets\":[{\"accessor\":0,\"format\":{\"id\":\"terms\",\"params\":{\"id\":\"string\",\"otherBucketLabel\":\"Other\",\"missingBucketLabel\":\"Missing\"}},\"params\":{},\"aggType\":\"terms\"}]}},\"aggs\":[{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"error.culprit\",\"size\":100,\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"Error Culprit\"}},{\"id\":\"5\",\"enabled\":true,\"type\":\"top_hits\",\"schema\":\"metric\",\"params\":{\"field\":\"error.exception.message\",\"aggregate\":\"concat\",\"size\":1,\"sortField\":\"@timestamp\",\"sortOrder\":\"desc\",\"customLabel\":\"Message\"}},{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{\"customLabel\":\"Number of Errors\"}},{\"id\":\"4\",\"enabled\":true,\"type\":\"top_hits\",\"schema\":\"metric\",\"params\":{\"field\":\"error.exception.type\",\"aggregate\":\"concat\",\"size\":1,\"sortField\":\"@timestamp\",\"sortOrder\":\"desc\",\"customLabel\":\"Type\"}},{\"id\":\"6\",\"enabled\":true,\"type\":\"top_hits\",\"schema\":\"metric\",\"params\":{\"field\":\"service.name\",\"aggregate\":\"concat\",\"size\":1,\"sortField\":\"@timestamp\",\"sortOrder\":\"desc\",\"customLabel\":\"App Name\"}},{\"id\":\"7\",\"enabled\":true,\"type\":\"top_hits\",\"schema\":\"metric\",\"params\":{\"field\":\"error.grouping_key\",\"aggregate\":\"concat\",\"size\":1,\"sortField\":\"@timestamp\",\"sortOrder\":\"desc\",\"customLabel\":\"Error Grouping Key\"}}]}"
|
||||
},
|
||||
"_type": "visualization"
|
||||
},
|
||||
{
|
||||
"_id": "c618e4e0-7c69-11e7-aa55-3b0d52c71c60",
|
||||
"_migrationVersion": {
|
||||
"visualization": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "apm-*",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
|
||||
"type": "index-pattern"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"description": "",
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"
|
||||
},
|
||||
"title": "Error Occurrences [APM]",
|
||||
"uiStateJSON": "{}",
|
||||
"version": 1,
|
||||
"visState": "{\"params\":{\"time_field\":\"@timestamp\",\"series\":[{\"line_width\":\"0\",\"terms_field\":\"error.grouping_key\",\"point_size\":1,\"color\":\"rgba(0,156,224,1)\",\"label\":\"Occurrences\",\"metrics\":[{\"type\":\"count\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\"}],\"seperate_axis\":0,\"split_mode\":\"terms\",\"chart_type\":\"bar\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"number\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"fill\":\"1\"}],\"axis_formatter\":\"number\",\"interval\":\">=1m\",\"filter\":\"processor.event:error\",\"show_legend\":0,\"show_grid\":1,\"axis_position\":\"left\",\"type\":\"timeseries\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\"},\"type\":\"metrics\",\"aggs\":[],\"title\":\"Error Occurrences [APM]\"}"
|
||||
},
|
||||
"_type": "visualization"
|
||||
}
|
||||
]
|
||||
@@ -1,111 +0,0 @@
|
||||
[
|
||||
{
|
||||
"_id": "8d3ed660-7828-11e7-8c47-65b845b5cfb3",
|
||||
"_migrationVersion": {
|
||||
"dashboard": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "1ffc5e20-7827-11e7-8c47-65b845b5cfb3",
|
||||
"name": "panel_0",
|
||||
"type": "visualization"
|
||||
},
|
||||
{
|
||||
"id": "1bdca740-7828-11e7-8c47-65b845b5cfb3",
|
||||
"name": "panel_1",
|
||||
"type": "visualization"
|
||||
},
|
||||
{
|
||||
"id": "804ffc40-7828-11e7-8c47-65b845b5cfb3",
|
||||
"name": "panel_2",
|
||||
"type": "visualization"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"description": "",
|
||||
"hits": 0,
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"version\":true,\"highlightAll\":true}"
|
||||
},
|
||||
"optionsJSON": "{\"darkTheme\": false}",
|
||||
"panelsJSON": "[{\"size_x\":12,\"size_y\":5,\"panelIndex\":1,\"col\":1,\"row\":4,\"panelRefName\":\"panel_0\"},{\"size_x\":6,\"size_y\":3,\"panelIndex\":2,\"col\":1,\"row\":1,\"panelRefName\":\"panel_1\"},{\"size_x\":6,\"size_y\":3,\"panelIndex\":3,\"col\":7,\"row\":1,\"panelRefName\":\"panel_2\"}]",
|
||||
"timeRestore": false,
|
||||
"title": "[APM] Services",
|
||||
"uiStateJSON": "{\"P-1\": {\"vis\": {\"params\": {\"sort\": {\"columnIndex\": null, \"direction\": null}}}}}",
|
||||
"version": 1
|
||||
},
|
||||
"_type": "dashboard"
|
||||
},
|
||||
{
|
||||
"_id": "1ffc5e20-7827-11e7-8c47-65b845b5cfb3",
|
||||
"_migrationVersion": {
|
||||
"visualization": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "apm-*",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
|
||||
"type": "index-pattern"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"description": "",
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"
|
||||
},
|
||||
"title": "Services [APM]",
|
||||
"uiStateJSON": "{\"vis\": {\"params\": {\"sort\": {\"columnIndex\": null, \"direction\": null}}}}",
|
||||
"version": 1,
|
||||
"visState": "{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null},\"perPage\":10,\"showPartialRows\":false,\"totalFunc\":\"sum\",\"showTotal\":false,\"showMeticsAtAllLevels\":false},\"type\":\"table\",\"aggs\":[{\"type\":\"avg\",\"enabled\":true,\"id\":\"1\",\"params\":{\"field\":\"transaction.duration.us\",\"customLabel\":\"Avg. Trans. Time\"},\"schema\":\"metric\"},{\"type\":\"percentiles\",\"enabled\":true,\"id\":\"3\",\"params\":{\"field\":\"transaction.duration.us\",\"percents\":[95],\"customLabel\":\"Trans. Time\"},\"schema\":\"metric\"},{\"type\":\"cardinality\",\"enabled\":true,\"id\":\"4\",\"params\":{\"field\":\"transaction.id\",\"customLabel\":\"Total Transactions\"},\"schema\":\"metric\"},{\"type\":\"cardinality\",\"enabled\":true,\"id\":\"6\",\"params\":{\"field\":\"error.id\",\"customLabel\":\"Errors\"},\"schema\":\"metric\"},{\"type\":\"terms\",\"enabled\":true,\"id\":\"2\",\"params\":{\"orderBy\":\"1\",\"field\":\"service.name\",\"order\":\"desc\",\"size\":1000},\"schema\":\"bucket\"}],\"title\":\"Services [APM]\"}"
|
||||
},
|
||||
"_type": "visualization"
|
||||
},
|
||||
{
|
||||
"_id": "1bdca740-7828-11e7-8c47-65b845b5cfb3",
|
||||
"_migrationVersion": {
|
||||
"visualization": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "apm-*",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
|
||||
"type": "index-pattern"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"description": "",
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"
|
||||
},
|
||||
"title": "Top Services by Transaction Time [APM]",
|
||||
"uiStateJSON": "{}",
|
||||
"version": 1,
|
||||
"visState": "{\"params\":{\"time_field\":\"@timestamp\",\"series\":[{\"line_width\":\"2\",\"terms_field\":\"service.name\",\"point_size\":1,\"color\":\"rgba(0,156,224,1)\",\"value_template\":\"{{value}} ms\",\"metrics\":[{\"field\":\"transaction.duration.us\",\"type\":\"avg\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\"}],\"seperate_axis\":0,\"split_mode\":\"terms\",\"chart_type\":\"line\",\"terms_order_by\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"us,ms,0\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"split_color_mode\":\"gradient\",\"fill\":\"0\"}],\"axis_formatter\":\"number\",\"interval\":\">=1m\",\"show_legend\":1,\"show_grid\":1,\"axis_position\":\"left\",\"type\":\"timeseries\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\"},\"type\":\"metrics\",\"aggs\":[],\"title\":\"Top Services by Transaction Time [APM]\"}"
|
||||
},
|
||||
"_type": "visualization"
|
||||
},
|
||||
{
|
||||
"_id": "804ffc40-7828-11e7-8c47-65b845b5cfb3",
|
||||
"_migrationVersion": {
|
||||
"visualization": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "apm-*",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
|
||||
"type": "index-pattern"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"description": "",
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"
|
||||
},
|
||||
"title": "Top Services by Transaction Per Minute [APM]",
|
||||
"uiStateJSON": "{}",
|
||||
"version": 1,
|
||||
"visState": "{\"params\":{\"time_field\":\"@timestamp\",\"series\":[{\"line_width\":\"2\",\"terms_field\":\"service.name\",\"point_size\":1,\"color\":\"rgba(0,156,224,1)\",\"value_template\":\"{{value}} tpm\",\"metrics\":[{\"type\":\"count\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\"},{\"field\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"cumulative_sum\",\"id\":\"3fcaa6c0-7828-11e7-bb25-2ff6dee07a1b\"},{\"field\":\"3fcaa6c0-7828-11e7-bb25-2ff6dee07a1b\",\"type\":\"derivative\",\"id\":\"467f1cd0-7828-11e7-bb25-2ff6dee07a1b\",\"unit\":\"1m\"},{\"field\":\"467f1cd0-7828-11e7-bb25-2ff6dee07a1b\",\"type\":\"positive_only\",\"id\":\"4bd1b8f0-7828-11e7-bb25-2ff6dee07a1b\",\"unit\":\"\"}],\"seperate_axis\":0,\"split_mode\":\"terms\",\"chart_type\":\"line\",\"terms_order_by\":\"_count\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"number\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"fill\":\"0\"}],\"axis_formatter\":\"number\",\"interval\":\">=1m\",\"show_legend\":1,\"show_grid\":1,\"axis_position\":\"left\",\"type\":\"timeseries\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\"},\"type\":\"metrics\",\"aggs\":[],\"title\":\"Top Apps by Transaction Per Minute [APM]\"}"
|
||||
},
|
||||
"_type": "visualization"
|
||||
}
|
||||
]
|
||||
@@ -1,67 +0,0 @@
|
||||
[
|
||||
{
|
||||
"_id": "3e3de700-7de0-11e7-b115-df9c90da2df1",
|
||||
"_migrationVersion": {
|
||||
"dashboard": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "d7735b90-7ddf-11e7-b115-df9c90da2df1",
|
||||
"name": "panel_0",
|
||||
"type": "search"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"description": "",
|
||||
"hits": 0,
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"version\":true,\"highlightAll\":true}"
|
||||
},
|
||||
"optionsJSON": "{\"darkTheme\": false}",
|
||||
"panelsJSON": "[{\"sort\":[\"span.start.us\",\"asc\"],\"col\":1,\"size_x\":12,\"size_y\":23,\"panelIndex\":1,\"columns\":[\"span.type\",\"span.name\",\"span.duration.us\",\"span.start.us\"],\"row\":1,\"panelRefName\":\"panel_0\"}]",
|
||||
"timeRestore": false,
|
||||
"title": "[APM] Span Details",
|
||||
"uiStateJSON": "{}",
|
||||
"version": 1
|
||||
},
|
||||
"_type": "dashboard"
|
||||
},
|
||||
{
|
||||
"_id": "d7735b90-7ddf-11e7-b115-df9c90da2df1",
|
||||
"_migrationVersion": {
|
||||
"search": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "apm-*",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
|
||||
"type": "index-pattern"
|
||||
},
|
||||
{
|
||||
"id": "apm-*",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index",
|
||||
"type": "index-pattern"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"columns": [
|
||||
"span.type",
|
||||
"span.name",
|
||||
"span.duration.us",
|
||||
"span.start.us"
|
||||
],
|
||||
"description": "",
|
||||
"hits": 0,
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"filter\":[{\"query\":{\"match\":{\"processor.event\":{\"query\":\"span\",\"type\":\"phrase\"}}},\"meta\":{\"value\":\"span\",\"disabled\":false,\"alias\":null,\"params\":{\"query\":\"span\",\"type\":\"phrase\"},\"key\":\"processor.event\",\"negate\":false,\"type\":\"phrase\",\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"$state\":{\"store\":\"appState\"}}],\"version\":true,\"highlightAll\":true,\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"
|
||||
},
|
||||
"sort": [
|
||||
"span.start.us",
|
||||
"asc"
|
||||
],
|
||||
"title": "Spans [APM]",
|
||||
"version": 1
|
||||
},
|
||||
"_type": "search"
|
||||
}
|
||||
]
|
||||
@@ -1,111 +0,0 @@
|
||||
[
|
||||
{
|
||||
"_id": "41b5d920-7821-11e7-8c47-65b845b5cfb3",
|
||||
"_migrationVersion": {
|
||||
"dashboard": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "a2e199b0-7820-11e7-8c47-65b845b5cfb3",
|
||||
"name": "panel_0",
|
||||
"type": "visualization"
|
||||
},
|
||||
{
|
||||
"id": "09bcf890-7822-11e7-8c47-65b845b5cfb3",
|
||||
"name": "panel_1",
|
||||
"type": "visualization"
|
||||
},
|
||||
{
|
||||
"id": "55606a60-7823-11e7-8c47-65b845b5cfb3",
|
||||
"name": "panel_2",
|
||||
"type": "visualization"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"description": "",
|
||||
"hits": 0,
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"version\":true,\"highlightAll\":true}"
|
||||
},
|
||||
"optionsJSON": "{\"darkTheme\": false}",
|
||||
"panelsJSON": "[{\"size_x\":12,\"size_y\":10,\"panelIndex\":1,\"col\":1,\"row\":4,\"panelRefName\":\"panel_0\"},{\"size_x\":6,\"size_y\":3,\"panelIndex\":2,\"col\":1,\"row\":1,\"panelRefName\":\"panel_1\"},{\"size_x\":6,\"size_y\":3,\"panelIndex\":3,\"col\":7,\"row\":1,\"panelRefName\":\"panel_2\"}]",
|
||||
"timeRestore": false,
|
||||
"title": "[APM] Transactions",
|
||||
"uiStateJSON": "{\"P-1\": {\"vis\": {\"params\": {\"sort\": {\"columnIndex\": null, \"direction\": null}}}}}",
|
||||
"version": 1
|
||||
},
|
||||
"_type": "dashboard"
|
||||
},
|
||||
{
|
||||
"_id": "a2e199b0-7820-11e7-8c47-65b845b5cfb3",
|
||||
"_migrationVersion": {
|
||||
"visualization": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "apm-*",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
|
||||
"type": "index-pattern"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"description": "",
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"
|
||||
},
|
||||
"title": "Top Transactions for Time Period [APM]",
|
||||
"uiStateJSON": "{\"vis\": {\"params\": {\"sort\": {\"columnIndex\": null, \"direction\": null}}}}",
|
||||
"version": 1,
|
||||
"visState": "{\"type\":\"table\",\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null},\"perPage\":25,\"showPartialRows\":false,\"totalFunc\":\"sum\",\"showTotal\":false,\"showMeticsAtAllLevels\":false},\"aggs\":[{\"params\":{\"orderBy\":\"1\",\"field\":\"transaction.name\",\"customLabel\":\"Transaction\",\"order\":\"desc\",\"size\":1000},\"type\":\"terms\",\"enabled\":true,\"id\":\"2\",\"schema\":\"bucket\"},{\"params\":{\"sortField\":\"@timestamp\",\"customLabel\":\"Type\",\"field\":\"transaction.type\",\"sortOrder\":\"desc\",\"aggregate\":\"concat\",\"size\":1},\"type\":\"top_hits\",\"enabled\":true,\"id\":\"5\",\"schema\":\"metric\"},{\"params\":{\"field\":\"transaction.duration.us\",\"customLabel\":\"Avg. Resp Time (ms)\"},\"type\":\"avg\",\"enabled\":true,\"id\":\"1\",\"schema\":\"metric\"},{\"params\":{\"field\":\"transaction.duration.us\",\"customLabel\":\"Resp Time (ms)\",\"percents\":[95]},\"type\":\"percentiles\",\"enabled\":true,\"id\":\"3\",\"schema\":\"metric\"},{\"params\":{\"sortField\":\"@timestamp\",\"customLabel\":\"View Spans\",\"field\":\"transaction.id\",\"sortOrder\":\"desc\",\"aggregate\":\"concat\",\"size\":1},\"type\":\"top_hits\",\"enabled\":true,\"id\":\"4\",\"schema\":\"metric\"}],\"title\":\"Top Transactions for Time Period [APM]\"}"
|
||||
},
|
||||
"_type": "visualization"
|
||||
},
|
||||
{
|
||||
"_id": "09bcf890-7822-11e7-8c47-65b845b5cfb3",
|
||||
"_migrationVersion": {
|
||||
"visualization": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "apm-*",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
|
||||
"type": "index-pattern"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"description": "",
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"
|
||||
},
|
||||
"title": "Transaction Times [APM]",
|
||||
"uiStateJSON": "{}",
|
||||
"version": 1,
|
||||
"visState": "{\"params\":{\"time_field\":\"@timestamp\",\"series\":[{\"line_width\":\"2\",\"point_size\":1,\"color\":\"rgba(0,156,224,1)\",\"value_template\":\"{{value}} ms\",\"label\":\"Average\",\"metrics\":[{\"field\":\"transaction.duration.us\",\"type\":\"avg\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\"}],\"seperate_axis\":0,\"split_mode\":\"everything\",\"chart_type\":\"line\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"us,ms,0\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"fill\":\"0\"},{\"line_width\":1,\"point_size\":1,\"color\":\"rgba(115,216,255,1)\",\"value_template\":\"{{value}} ms\",\"label\":\"95th Percentile\",\"metrics\":[{\"field\":\"transaction.duration.us\",\"percentiles\":[{\"mode\":\"line\",\"percentile\":\"\",\"shade\":0.2,\"value\":\"95\",\"id\":\"858ec670-7821-11e7-8745-07eaffcb65e5\"}],\"type\":\"percentile\",\"id\":\"79921481-7821-11e7-8745-07eaffcb65e5\"}],\"seperate_axis\":0,\"split_mode\":\"everything\",\"chart_type\":\"line\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"us,ms,0\",\"id\":\"79921480-7821-11e7-8745-07eaffcb65e5\",\"fill\":0.5},{\"line_width\":\"2\",\"point_size\":1,\"color\":\"rgba(254,146,0,1)\",\"value_template\":\"{{value}} ms\",\"label\":\"99th Percentile\",\"metrics\":[{\"field\":\"transaction.duration.us\",\"percentiles\":[{\"mode\":\"line\",\"percentile\":\"\",\"shade\":0.2,\"value\":\"99\",\"id\":\"858ec670-7821-11e7-8745-07eaffcb65e5\"}],\"type\":\"percentile\",\"id\":\"c1e42de1-7821-11e7-8745-07eaffcb65e5\"}],\"seperate_axis\":0,\"split_mode\":\"everything\",\"chart_type\":\"line\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"us,ms,0\",\"id\":\"c1e42de0-7821-11e7-8745-07eaffcb65e5\",\"fill\":\"0\"}],\"axis_formatter\":\"number\",\"interval\":\">=1m\",\"show_legend\":1,\"show_grid\":1,\"legend_position\":\"right\",\"axis_position\":\"left\",\"type\":\"timeseries\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\"},\"type\":\"metrics\",\"aggs\":[],\"title\":\"Transaction Times [APM]\"}"
|
||||
},
|
||||
"_type": "visualization"
|
||||
},
|
||||
{
|
||||
"_id": "55606a60-7823-11e7-8c47-65b845b5cfb3",
|
||||
"_migrationVersion": {
|
||||
"visualization": "7.0.0"
|
||||
},
|
||||
"_references": [
|
||||
{
|
||||
"id": "apm-*",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
|
||||
"type": "index-pattern"
|
||||
}
|
||||
],
|
||||
"_source": {
|
||||
"description": "",
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"
|
||||
},
|
||||
"title": "Transaction Per Minute [APM]",
|
||||
"uiStateJSON": "{}",
|
||||
"version": 1,
|
||||
"visState": "{\"params\":{\"time_field\":\"@timestamp\",\"series\":[{\"line_width\":\"2\",\"terms_field\":\"transaction.result\",\"point_size\":\"0\",\"color\":\"rgba(115,216,255,1)\",\"value_template\":\"{{value}} tpm\",\"label\":\"\",\"metrics\":[{\"field\":\"transaction.id\",\"type\":\"cardinality\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\"},{\"field\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"cumulative_sum\",\"id\":\"3fcaa6c0-7828-11e7-bb25-2ff6dee07a1b\"},{\"field\":\"3fcaa6c0-7828-11e7-bb25-2ff6dee07a1b\",\"type\":\"derivative\",\"id\":\"467f1cd0-7828-11e7-bb25-2ff6dee07a1b\",\"unit\":\"1m\"},{\"field\":\"467f1cd0-7828-11e7-bb25-2ff6dee07a1b\",\"type\":\"positive_only\",\"id\":\"4bd1b8f0-7828-11e7-bb25-2ff6dee07a1b\",\"unit\":\"\"}],\"seperate_axis\":0,\"split_mode\":\"everything\",\"chart_type\":\"line\",\"stacked\":\"none\",\"axis_position\":\"right\",\"formatter\":\"number\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"fill\":\"0\"}],\"axis_formatter\":\"number\",\"interval\":\">=1m\",\"show_legend\":0,\"show_grid\":1,\"axis_position\":\"left\",\"type\":\"timeseries\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\"},\"type\":\"metrics\",\"aggs\":[],\"title\":\"Transaction Per Minute [APM]\"}"
|
||||
},
|
||||
"_type": "visualization"
|
||||
}
|
||||
]
|
||||
@@ -1,9 +0,0 @@
|
||||
FROM docker.elastic.co/apm/apm-server-oss:7.4.2 as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
# config
|
||||
# COPY ${DOCKER_BUILD_DIR}/apm-server.yml /usr/share/apm-server/
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
@@ -1,26 +0,0 @@
|
||||
FROM alpine:latest as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG CURATOR_VERSION=5.8.3
|
||||
|
||||
RUN apk --no-cache add \
|
||||
bash \
|
||||
py-pip \
|
||||
&& pip install elasticsearch-curator==${CURATOR_VERSION}
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh /
|
||||
COPY ${DOCKER_BUILD_DIR}/config.yml /etc/curator/
|
||||
COPY ${DOCKER_BUILD_DIR}/action.yml /etc/curator/
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
# install cronlock
|
||||
ADD https://raw.github.com/kvz/cronlock/master/cronlock /usr/bin/cronlock
|
||||
RUN chmod +rx /usr/bin/cronlock
|
||||
|
||||
# install ssmtp
|
||||
RUN apk --no-cache add ssmtp && \
|
||||
echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
actions:
|
||||
1:
|
||||
action: delete_indices
|
||||
description: >-
|
||||
Delete indices older than ${UNIT_COUNT:1} ${UNIT:months} based on index name, for apm-*
|
||||
and logs-* prefixed indices. Ignore the error if the filter does not result in an
|
||||
actionable list of indices (ignore_empty_list) and exit cleanly.
|
||||
options:
|
||||
ignore_empty_list: True
|
||||
timeout_override:
|
||||
continue_if_exception: True
|
||||
disable_action: False
|
||||
filters:
|
||||
- filtertype: pattern
|
||||
kind: regex
|
||||
value: '^(apm|logs)-.*$'
|
||||
- filtertype: age
|
||||
source: name
|
||||
direction: older
|
||||
timestring: '%Y.%m.%d'
|
||||
unit: ${UNIT:months}
|
||||
unit_count: ${UNIT_COUNT:1}
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
client:
|
||||
hosts: ${HOSTS:elasticsearch}
|
||||
port: ${PORT:9200}
|
||||
url_prefix:
|
||||
use_ssl: ${USE_SSL:False}
|
||||
certificate:
|
||||
client_cert:
|
||||
client_key:
|
||||
ssl_no_validate: False
|
||||
http_auth:
|
||||
timeout: ${TIMEOUT:30}
|
||||
master_only: ${MASTER_ONLY:False}
|
||||
logging:
|
||||
loglevel: ${LOGLEVEL:INFO}
|
||||
logfile:
|
||||
logformat: ${LOGFORMAT:default}
|
||||
blacklist: ['elasticsearch', 'urllib3']
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -euo errexit
|
||||
|
||||
trap 'kill -SIGQUIT $PID' INT
|
||||
|
||||
CRON_DAILY_COMMAND="/usr/bin/curator --config /etc/curator/config.yml /etc/curator/action.yml"
|
||||
[ "${DEPLOY:-}" = "true" ] && CRON_DAILY_COMMAND="cronlock ${CRON_DAILY_COMMAND}"
|
||||
|
||||
cat > /etc/periodic/daily/curator <<EOF
|
||||
#!/bin/sh
|
||||
${CRON_DAILY_COMMAND}
|
||||
EOF
|
||||
chmod +x /etc/periodic/daily/curator
|
||||
|
||||
[ $# -eq 0 ] && exec crond -f -L/dev/stdout || exec "$@" &
|
||||
PID=$! && wait
|
||||
@@ -1,25 +0,0 @@
|
||||
FROM alpine:latest as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
ARG DOCKER_MACHINE=x86_64
|
||||
ARG DOCKER_SYSTEM=Linux
|
||||
ARG FABIO_REMOTE=https://github.com/fabiolb/fabio
|
||||
ARG FABIO_VERSION=1.6.3
|
||||
|
||||
RUN apk update \
|
||||
&& apk add --no-cache ca-certificates \
|
||||
&& OS="$(echo ${DOCKER_SYSTEM} |awk '{print tolower($0)}')" \
|
||||
&& ARCH="$(echo ${DOCKER_MACHINE} |awk '{print /x86_64/ ? "amd64" : /arch64/ ? "arm64" : /armv(6|7)/ ? "arm" : $0}')" \
|
||||
&& wget -qO /usr/bin/fabio ${FABIO_REMOTE}/releases/download/v${FABIO_VERSION}/fabio-${FABIO_VERSION}-${OS}_${ARCH} \
|
||||
&& chmod +x /usr/bin/fabio
|
||||
|
||||
EXPOSE 9998 9999
|
||||
ENTRYPOINT ["/usr/bin/fabio"]
|
||||
CMD ["-cfg", "/etc/fabio/fabio.properties"]
|
||||
|
||||
HEALTHCHECK CMD status=$(echo -e 'GET /health HTTP/1.0\n' |nc -w 1 localhost 9998 | sed -n '$p') \
|
||||
&& echo "$status" && [ "$status" = "OK" ] || exit 1
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
@@ -1,24 +0,0 @@
|
||||
FROM golang:1.15-alpine AS build
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG GOOFYS_VERSION=v0.24.0
|
||||
|
||||
WORKDIR /src/github.com/kahing/goofys/
|
||||
|
||||
RUN apk --no-cache upgrade \
|
||||
&& apk --no-cache add git make \
|
||||
&& git clone https://github.com/kahing/goofys/ . \
|
||||
&& git checkout tags/${GOOFYS_VERSION} -b ${GOOFYS_VERSION} \
|
||||
&& go get . \
|
||||
&& make install
|
||||
|
||||
FROM alpine:latest as dist
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
COPY --from=build /go/bin/goofys /bin/goofys
|
||||
|
||||
ENTRYPOINT ["/bin/goofys"]
|
||||
|
||||
# goofys -f --region $REGION --stat-cache-ttl $STAT_CACHE_TTL --type-cache-ttl $TYPE_CACHE_TTL --dir-mode $DIR_MODE --file-mode $FILE_MODE -o nonempty $BUCKET $MOUNT_DIR
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
@@ -1,26 +0,0 @@
|
||||
FROM grafana/grafana:latest as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG AWS_ACCESS_KEY
|
||||
ARG AWS_SECRET_KEY
|
||||
ARG MYSQL_GRAFANA_USER
|
||||
ARG MYSQL_GRAFANA_PASSWORD
|
||||
ARG MYSQL_GRAFANA_DB
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/config.ini /etc/grafana/config.ini
|
||||
COPY ${DOCKER_BUILD_DIR}/dashboards /etc/grafana/dashboards
|
||||
COPY ${DOCKER_BUILD_DIR}/provisioning /etc/grafana/provisioning
|
||||
|
||||
USER root
|
||||
|
||||
RUN sed 's@AWS_ACCESS_KEY@'"${AWS_ACCESS_KEY:-UNDEFINED}"'@g; s@AWS_SECRET_KEY@'"${AWS_SECRET_KEY:-UNDEFINED}"'@g; s@MYSQL_GRAFANA_USER@'"${MYSQL_GRAFANA_USER:-UNDEFINED}"'@g; s@MYSQL_GRAFANA_PASSWORD@'"${MYSQL_GRAFANA_PASSWORD:-UNDEFINED}"'@g; s@MYSQL_GRAFANA_DB@'"${MYSQL_GRAFANA_DB:-UNDEFINED}"'@g' /etc/grafana/provisioning/datasources/datasources.tmpl > /etc/grafana/provisioning/datasources/datasources.yml
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh /
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
USER grafana
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
@@ -1,2 +0,0 @@
|
||||
[paths]
|
||||
provisioning = /etc/grafana/provisioning
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p /var/lib/grafana/dashboards
|
||||
cp -a /etc/grafana/dashboards/* /var/lib/grafana/dashboards/
|
||||
/run.sh
|
||||
@@ -1,6 +0,0 @@
|
||||
- name: 'default'
|
||||
org_id: 1
|
||||
folder: ''
|
||||
type: 'file'
|
||||
options:
|
||||
path: '/var/lib/grafana/dashboards' ## Contains dashboards host.json and containers.json
|
||||
@@ -1,30 +0,0 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
|
||||
- name: 'Prometheus'
|
||||
type: 'prometheus'
|
||||
access: 'proxy'
|
||||
org_id: 1
|
||||
url: 'http://prometheus:9090'
|
||||
is_default: true
|
||||
version: 1
|
||||
editable: true
|
||||
|
||||
- name: "AWS_Cloudwatch"
|
||||
type: cloudwatch
|
||||
jsonData:
|
||||
authType: keys
|
||||
defaultRegion: eu-west-1
|
||||
secureJsonData:
|
||||
accessKey: "AWS_ACCESS_KEY"
|
||||
secretKey: "AWS_SECRET_KEY"
|
||||
|
||||
- name: MySQL
|
||||
type: mysql
|
||||
url: mysql:3306
|
||||
database: MYSQL_GRAFANA_DB
|
||||
user: MYSQL_GRAFANA_USER
|
||||
password: MYSQL_GRAFANA_PASSWORD
|
||||
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
FROM httpd:alpine as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG HTTPD_LOAD_MODULE="env expires headers lbmethod_bybusyness lbmethod_byrequests proxy proxy_balancer proxy_fcgi proxy_http setenvif slotmem_shm reqtimeout rewrite"
|
||||
ARG HTTPD_CONF_EXTRA="default info mpm vhosts"
|
||||
|
||||
RUN sed -E -i \
|
||||
-e 's!^#?\s*(LoadModule ('${HTTPD_LOAD_MODULE// /|}')_module modules/mod_('${HTTPD_LOAD_MODULE// /|}').so)\s*!\1!g' \
|
||||
-e 's!^#?\s*(Include conf/extra/httpd-('${HTTPD_CONF_EXTRA// /|}').conf)\s*!\1!g' \
|
||||
"$HTTPD_PREFIX/conf/httpd.conf";
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh /
|
||||
COPY ${DOCKER_BUILD_DIR}/httpd-vhosts.ctmpl /usr/local/apache2/conf/extra/
|
||||
COPY --from=hashicorp/consul-template:alpine /bin/consul-template /usr/local/bin/
|
||||
|
||||
WORKDIR /var/www
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD /usr/local/bin/consul-template -log-level info -consul-addr consul:8500 -template "/usr/local/apache2/conf/extra/httpd-vhosts.ctmpl:/usr/local/apache2/conf/extra/httpd-vhosts.conf" -exec "/usr/local/bin/httpd-foreground"
|
||||
|
||||
EXPOSE 80/tcp
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -euo pipefail
|
||||
set -o errexit
|
||||
|
||||
trap 'kill -SIGQUIT $PID' INT
|
||||
|
||||
# Launch httpd
|
||||
[ $# -eq 0 ] && httpd-foreground || exec "$@" &
|
||||
PID=$! && wait
|
||||
@@ -1,21 +0,0 @@
|
||||
{{ $serverName := printf "%s.%s.%s" (env "ENV") (env "APP") (env "USER") }}
|
||||
{{ $serviceName := printf "%s-%s-%s-php-9000" (env "USER") (env "APP") (env "ENV") }}
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin support+apache@asycn.io
|
||||
DocumentRoot "/var/www/web"
|
||||
ServerName {{ $serverName }}
|
||||
ServerAlias *
|
||||
<FilesMatch "\.php$">
|
||||
SetHandler "proxy:balancer://php/"
|
||||
</FilesMatch>
|
||||
<Proxy "balancer://php/">
|
||||
{{ range service $serviceName }} BalancerMember "fcgi://{{ .Address }}:{{ .Port }}/" disablereuse=On timeout=900
|
||||
{{ end }} ProxySet lbmethod=bybusyness
|
||||
</Proxy>
|
||||
<Directory /var/www/web>
|
||||
AllowOverride All
|
||||
CGIPassAuth On
|
||||
Options +FollowSymLinks
|
||||
Require all granted
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
@@ -1,49 +0,0 @@
|
||||
ARG IPFS_VERSION=0.32.1
|
||||
FROM ipfs/kubo:v${IPFS_VERSION} AS dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
RUN sed -i 's!repo="$IPFS_PATH"!repo="$IPFS_PATH" \&\& mkdir -p "$IPFS_PATH" \&\& chown ipfs:users $(dirname "$IPFS_PATH") \&\& chown ipfs:users "$IPFS_PATH"!' /usr/local/bin/start_ipfs
|
||||
COPY ${DOCKER_BUILD_DIR}/*.sh /container-init.d/
|
||||
RUN chmod +rx /container-init.d/*.sh
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD ipfs --api=$(cat $IPFS_PATH/api) dag stat /ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn || exit 1
|
||||
|
||||
FROM dist AS master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG UID
|
||||
ENV UID=${UID}
|
||||
ENV USER=ipfs
|
||||
|
||||
# If we provide a numeric UID
|
||||
RUN if [ "${UID}" -eq "${UID}" ] 2>/dev/null; then \
|
||||
# Force $UID of $USER if it exists
|
||||
if [ "$(awk -F: '$1 == "'"${USER}"'" {print $3}' /etc/passwd)" != "${UID}" ]; then \
|
||||
sed -i 's/^\('"${USER}"':x\):[0-9]\+:/\1:'"${UID}"':/' /etc/passwd; \
|
||||
fi; \
|
||||
# Create $USER if $UID does not exist
|
||||
if [ "$(awk -F: '$3 == "'"${UID}"'" {print $1}' /etc/passwd)" = "" ]; then \
|
||||
echo "${USER}:x:${UID}:${GID:-${UID}}::/home/${USER}:${SHELL:-/bin/sh}" >> /etc/passwd; \
|
||||
echo "${USER}:\!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \
|
||||
mkdir -p /home/"${USER}"; \
|
||||
fi; \
|
||||
chown "${UID}" $(awk -F: '$1 == "'"${USER}"'" {print $(NF-1)}' /etc/passwd); \
|
||||
fi
|
||||
|
||||
# If we provide a numeric GID
|
||||
RUN if [ "${GID}" -eq "${GID}" ] 2>/dev/null; then \
|
||||
# Force $GID of $GROUP if it already exists
|
||||
if [ "$(awk -F: '$1 == "'"${GROUP}"'" {print $3}' /etc/group)" != "${GID}" ]; then \
|
||||
sed -i 's/^\('"${GROUP}"':x\):[0-9]\+:/\1:'"${GID}"':/' /etc/group; \
|
||||
fi; \
|
||||
# Create $GROUP if $GID does not exist
|
||||
if [ "$(awk -F: '$3 == "'"${GID}"'" {print $1}' /etc/group)" = "" ]; then \
|
||||
echo "${GROUP}:x:${GID}:" >> /etc/group; \
|
||||
fi; \
|
||||
# Force $GID of $USER if it exists
|
||||
if [ "$(awk -F: '$1 == "'"${USER}"'" {print $4}' /etc/passwd)" != "${GID}" ]; then \
|
||||
sed -i 's/^\('"${USER}"':x:[0-9]\+\):[0-9]\+:/\1:'"${GID}"':/' /etc/passwd; \
|
||||
fi; \
|
||||
chgrp "${GID}" $(awk -F: '$1 == "'"${USER}"'" {print $(NF-1)}' /etc/passwd); \
|
||||
fi
|
||||
@@ -1,201 +0,0 @@
|
||||
#!/bin/sh
|
||||
[ -n "${DEBUG:-}" -a "${DEBUG:-}" != "false" ] && set -x
|
||||
set -e
|
||||
|
||||
## fix resource manager fatal error on arm64/linux with 2Gb RAM
|
||||
# ipfs config --json Swarm.ResourceMgr.Enabled false
|
||||
# ERROR p2pnode libp2p/rcmgr_defaults.go:107 ===> OOF! go-libp2p changed DefaultServiceLimits
|
||||
|
||||
# apply migration
|
||||
if [ "${IPFS_REPO_MIGRATE}" = "true" ]; then ipfs repo stat >/dev/null || ipfs repo migrate; fi
|
||||
|
||||
# set ipfs peer id
|
||||
[ -n "${IPFS_IDENTITY_PEERID}" ] && [ -n "${IPFS_IDENTITY_PRIVKEY}" ] \
|
||||
&& sed -i 's/"PeerID":.*/"PeerID": "'"${IPFS_IDENTITY_PEERID}"'",/;s/"PrivKey":.*/"PrivKey": "'"${IPFS_IDENTITY_PRIVKEY}"'"/' "${IPFS_PATH}/config" \
|
||||
|| true
|
||||
|
||||
# apply ipfs profile
|
||||
[ -n "${IPFS_PROFILE}" ] && for profile in ${IPFS_PROFILE}; do ipfs config profile apply "${profile}"; done
|
||||
|
||||
## ipfs client needs API address
|
||||
# search for ip address of $(hostname).${IPFS_ADDRESSES_API_DOMAIN}
|
||||
[ -n "${IPFS_ADDRESSES_API_DOMAIN}" ] && [ -z "${IPFS_ADDRESSES_API_INET4}" ] \
|
||||
&& IPFS_ADDRESSES_API_INET4=$(nslookup -type=A -timeout=1 "$(hostname).${IPFS_ADDRESSES_API_DOMAIN}" |awk 'found && /^Address:/ {print $2; found=0}; /^Name:\t'"$(hostname).${IPFS_ADDRESSES_API_DOMAIN}"'/ {found=1};')
|
||||
# check ${IPFS_ADDRESSES_API_INET4} format
|
||||
echo "${IPFS_ADDRESSES_API_INET4}" |awk -F. '{ for ( i=1; i<=4; i++ ) if ($i >= 0 && $i <= 255); else exit 1;}; NF != 4 {exit 1;}' || unset IPFS_ADDRESSES_API_INET4
|
||||
# check ${IPFS_ADDRESSES_API_PORT} format
|
||||
[ "${IPFS_ADDRESSES_API_PORT}" -eq "${IPFS_ADDRESSES_API_PORT}" ] 2>/dev/null && [ "${IPFS_ADDRESSES_API_PORT}" -ge 1 ] && [ "${IPFS_ADDRESSES_API_PORT}" -le 65535 ] \
|
||||
|| unset IPFS_ADDRESSES_API_PORT
|
||||
ipfs config Addresses.Api "${IPFS_ADDRESSES_API:-/ip4/${IPFS_ADDRESSES_API_INET4:-127.0.0.1}/tcp/${IPFS_ADDRESSES_API_PORT:-5001}}"
|
||||
|
||||
## gateway address
|
||||
# search for ip address of $(hostname).${IPFS_ADDRESSES_GATEWAY_DOMAIN}
|
||||
[ -n "${IPFS_ADDRESSES_GATEWAY_DOMAIN}" ] && [ -z "${IPFS_ADDRESSES_GATEWAY_INET4}" ] \
|
||||
&& IPFS_ADDRESSES_GATEWAY_INET4=$(nslookup -type=A -timeout=1 "$(hostname).${IPFS_ADDRESSES_GATEWAY_DOMAIN}" |awk 'found && /^Address:/ {print $2; found=0}; /^Name:\t'"$(hostname).${IPFS_ADDRESSES_GATEWAY_DOMAIN}"'/ {found=1};')
|
||||
# check ${IPFS_ADDRESSES_GATEWAY_INET4} format
|
||||
echo "${IPFS_ADDRESSES_GATEWAY_INET4}" |awk -F. '{ for ( i=1; i<=4; i++ ) if ($i >= 0 && $i <= 255); else exit 1;}; NF != 4 {exit 1;}' || unset IPFS_ADDRESSES_GATEWAY_INET4
|
||||
# check ${IPFS_ADDRESSES_GATEWAY_PORT} format
|
||||
[ "${IPFS_ADDRESSES_GATEWAY_PORT}" -eq "${IPFS_ADDRESSES_GATEWAY_PORT}" ] 2>/dev/null && [ "${IPFS_ADDRESSES_GATEWAY_PORT}" -ge 1 ] && [ "${IPFS_ADDRESSES_GATEWAY_PORT}" -le 65535 ] \
|
||||
|| unset IPFS_ADDRESSES_GATEWAY_PORT
|
||||
ipfs config Addresses.Gateway "${IPFS_ADDRESSES_GATEWAY:-/ip4/${IPFS_ADDRESSES_GATEWAY_INET4:-127.0.0.1}/tcp/${IPFS_ADDRESSES_GATEWAY_PORT:-8080}}"
|
||||
|
||||
[ -n "${IPFS_ADDRESSES_SWARM}" ] && ipfs config --json Addresses.Swarm "${IPFS_ADDRESSES_SWARM}"
|
||||
[ -n "${IPFS_ADDRESSES_ANNOUNCE}" ] && ipfs config --json Addresses.Announce "${IPFS_ADDRESSES_ANNOUNCE}"
|
||||
[ -n "${IPFS_ADDRESSES_APPENDANNOUNCE}" ] && ipfs config --json Addresses.AppendAnnounce "${IPFS_ADDRESSES_APPENDANNOUNCE}"
|
||||
[ -n "${IPFS_ADDRESSES_NOANNOUNCE}" ] && ipfs config --json Addresses.NoAnnounce "${IPFS_ADDRESSES_NOANNOUNCE}"
|
||||
|
||||
## api http headers
|
||||
[ -n "${IPFS_API_HTTPHEADERS}${IPFS_API_HTTPHEADERS_ACA_CREDENTIALS}${IPFS_API_HTTPHEADERS_ACA_HEADERS}${IPFS_API_HTTPHEADERS_ACA_METHODS}${IPFS_API_HTTPHEADERS_ACA_ORIGIN}" ] \
|
||||
&& ipfs config --json API.HTTPHeaders "${IPFS_API_HTTPHEADERS:-{
|
||||
\"Access-Control-Allow-Credentials\": ${IPFS_API_HTTPHEADERS_ACA_CREDENTIALS:-null},
|
||||
\"Access-Control-Allow-Headers\": ${IPFS_API_HTTPHEADERS_ACA_HEADERS:-null},
|
||||
\"Access-Control-Allow-Methods\": ${IPFS_API_HTTPHEADERS_ACA_METHODS:-null},
|
||||
\"Access-Control-Allow-Origin\": ${IPFS_API_HTTPHEADERS_ACA_ORIGIN:-null}
|
||||
}}"
|
||||
|
||||
## api authorizations: "Bob": { "AuthSecret": "bearer:secret-token123", "AllowedPaths": ["/api/v0"] }
|
||||
[ -n "${IPFS_API_AUTHORIZATIONS}" ] && ipfs config --json API.Authorizations "${IPFS_API_AUTHORIZATIONS}"
|
||||
|
||||
## autonat service
|
||||
[ -n "$IPFS_AUTONAT$IPFS_AUTONAT_SERVICEMODE$IPFS_AUTONAT_THROTTLE$IPFS_AUTONAT_THROTTLE_GLOBALLIMIT$IPFS_AUTONAT_THROTTLE_PEERLIMIT$IPFS_AUTONAT_THROTTLE_INTERVAL" ] \
|
||||
&& ipfs config --json AutoNAT "${IPFS_AUTONAT:-{
|
||||
\"ServiceMode\": ${IPFS_AUTONAT_SERVICEMODE:-null},
|
||||
\"Throttle\": ${IPFS_AUTONAT_THROTTLE:-{
|
||||
\"GlobalLimit\": ${IPFS_AUTONAT_THROTTLE_GLOBALLIMIT:-null},
|
||||
\"PeerLimit\": ${IPFS_AUTONAT_THROTTLE_PEERLIMIT:-null},
|
||||
\"Interval\": \"${IPFS_AUTONAT_THROTTLE_INTERVAL:-null}\"
|
||||
}
|
||||
}}"
|
||||
|
||||
## auto tls
|
||||
[ -n "$IPFS_AUTOTLS$IPFS_AUTOTLS_ENABLED$IPFS_AUTOTLS_DOMAINSUFFIX$IPFS_AUTOTLS_REGISTRATIONENDPOINT$IPFS_AUTOTLS_REGISTRATIONTOKEN$IPFS_AUTOTLS_CAENDPOINT" ] \
|
||||
&& ipfs config --json AutoNAT "${IPFS_AUTOTLS:-{
|
||||
\"Enabled\": ${IPFS_AUTOTLS_ENABLED:-null},
|
||||
\"DomainSuffix\": ${IPFS_AUTOTLS_DOMAINSUFFIX:-null},
|
||||
\"RegistrationEndpoint\": ${IPFS_AUTOTLS_REGISTRATIONENDPOINT:-null},
|
||||
\"RegistrationToken\": ${IPFS_AUTOTLS_REGISTRATIONTOKEN:-null},
|
||||
\"CAEndpoint\": ${IPFS_AUTOTLS_CAENDPOINT:-null}
|
||||
}}"
|
||||
|
||||
## bootstrap
|
||||
[ -n "${IPFS_BOOTSTRAP}" ] && ipfs config --json Bootstrap "${IPFS_BOOTSTRAP}"
|
||||
|
||||
## storage
|
||||
# limit disk usage to xx/percent of disk size
|
||||
diskSize=$(df -P ${IPFS_PATH:-~/.ipfs} | awk 'NR>1{size+=$2}END{print size}')
|
||||
ipfs config Datastore.StorageMax "$((diskSize * ${IPFS_DATASTORE_DISKUSAGE:-50}/100))"
|
||||
# garbage collector is declenched over xx/percent of available disk used
|
||||
[ -n "${IPFS_DATASTORE_STORAGEGCWATERMARK}" ] && ipfs config Datastore.StorageGCWatermark "${IPFS_DATASTORE_STORAGEGCWATERMARK}"
|
||||
# automatic garbage collector run every time period
|
||||
[ -n "${IPFS_DATASTORE_GCPERIOD}" ] && ipfs config Datastore.GCPeriod "${IPFS_DATASTORE_GCPERIOD}"
|
||||
[ -n "${IPFS_DATASTORE_HASHONREAD}" ] && ipfs config --bool Datastore.HashOnRead "${IPFS_DATASTORE_HASHONREAD}"
|
||||
[ -n "${IPFS_DATASTORE_BLOOMFILTERSIZE}" ] && ipfs config --json Datastore.BloomFilterSize "${IPFS_DATASTORE_BLOOMFILTERSIZE}"
|
||||
[ -n "${IPFS_DATASTORE_SPEC}" ] && ipfs config --json Datastore.Spec "${IPFS_DATASTORE_SPEC}"
|
||||
|
||||
## ALLOW AUTO DISCOVERY ON DOCKER NETWORK
|
||||
[ -n "${IPFS_DISCOVERY_MDNS_ENABLED}" ] && ipfs config --bool Discovery.MDNS.Enabled "${IPFS_DISCOVERY_MDNS_ENABLED}"
|
||||
[ -n "${IPFS_DOCKER_NETWORK}" ] && ipfs config --json Addresses.NoAnnounce "$(ipfs config Addresses.NoAnnounce |sed '/"${IPFS_DOCKER_NETWORK}"/d')"
|
||||
|
||||
## serve only local content
|
||||
[ -n "${IPFS_GATEWAY_NOFETCH}" ] && ipfs config --bool Gateway.NoFetch "${IPFS_GATEWAY_NOFETCH}"
|
||||
## redirect content with TXT DNS link prefix
|
||||
[ -n "${IPFS_GATEWAY_NODNSLINK}" ] && ipfs config --bool Gateway.NoDNSLink "${IPFS_GATEWAY_NODNSLINK}"
|
||||
## false = trustless gateway
|
||||
[ -n "${IPFS_GATEWAY_DESERIALIZEDRESPONSES}" ] && ipfs config --json Gateway.DeserializedResponses "${IPFS_GATEWAY_DESERIALIZEDRESPONSES}"
|
||||
## pretty html errors
|
||||
[ -n "${IPFS_GATEWAY_DISABLEHTMLERRORS}" ] && ipfs config --json Gateway.DisableHTMLErrors "${IPFS_GATEWAY_DISABLEHTMLERRORS}"
|
||||
## someguy
|
||||
[ -n "${IPFS_GATEWAY_EXPOSEROUTINGAPI}" ] && ipfs config --json Gateway.ExposeRoutingAPI "${IPFS_GATEWAY_EXPOSEROUTINGAPI}"
|
||||
## gateway http headers
|
||||
[ -n "${IPFS_GATEWAY_HTTPHEADERS}${IPFS_GATEWAY_HTTPHEADERS_ACA_CREDENTIALS}${IPFS_GATEWAY_HTTPHEADERS_ACA_HEADERS}${IPFS_GATEWAY_HTTPHEADERS_ACA_METHODS}${IPFS_GATEWAY_HTTPHEADERS_ACA_ORIGIN}" ] \
|
||||
&& ipfs config --json Gateway.HTTPHeaders "${IPFS_GATEWAY_HTTPHEADERS:-{
|
||||
\"Access-Control-Allow-Credentials\": ${IPFS_GATEWAY_HTTPHEADERS_ACA_CREDENTIALS:-null},
|
||||
\"Access-Control-Allow-Headers\": ${IPFS_GATEWAY_HTTPHEADERS_ACA_HEADERS:-null},
|
||||
\"Access-Control-Allow-Methods\": ${IPFS_GATEWAY_HTTPHEADERS_ACA_METHODS:-null},
|
||||
\"Access-Control-Allow-Origin\": ${IPFS_GATEWAY_HTTPHEADERS_ACA_ORIGIN:-null}
|
||||
}}"
|
||||
## redirect /
|
||||
[ -n "${IPFS_GATEWAY_ROOTREDIRECT}" ] && ipfs config Gateway.RootRedirect "${IPFS_GATEWAY_ROOTREDIRECT}"
|
||||
## public gateways: { "localhost": { "Paths": ["/ipfs", "/ipns"], "UseSubdomains": true } }
|
||||
[ -n "${IPFS_GATEWAY_PUBLICGATEWAYS}" ] && ipfs config --json Gateway.PublicGateways "${IPFS_GATEWAY_PUBLICGATEWAYS}"
|
||||
|
||||
## ipns
|
||||
[ -n "${IPFS_IPNS_REPUBLISHPERIOD}" ] && ipfs config Ipns.RepublishPeriod "${IPFS_IPNS_REPUBLISHPERIOD}"
|
||||
[ -n "${IPFS_IPNS_RECORDLIFETIME}" ] && ipfs config Ipns.RecordLifetime "${IPFS_IPNS_RECORDLIFETIME}"
|
||||
[ -n "${IPFS_IPNS_RESOLVECACHESIZE}" ] && ipfs config Ipns.ResolveCacheSize "${IPFS_IPNS_RESOLVECACHESIZE}"
|
||||
[ -n "${IPFS_IPNS_MAXCACHETTL}" ] && ipfs config Ipns.MaxCacheTTL "${IPFS_IPNS_MAXCACHETTL}"
|
||||
[ -n "${IPFS_IPNS_USEPUBSUB}" ] && ipfs config --json Ipns.UsePubsub "${IPFS_IPNS_USEPUBSUB}"
|
||||
|
||||
## pinning
|
||||
[ -n "${IPFS_PINNING_REMOTESERVICES}" ] && ipfs config --json Pinning.RemoteServices "${IPFS_PINNING_REMOTESERVICES}"
|
||||
|
||||
## peering :)
|
||||
[ -n "${IPFS_PEERING_PEERS}" ] && ipfs config --json Peering.Peers "${IPFS_PEERING_PEERS}"
|
||||
|
||||
## reproviding local content to routing system
|
||||
[ -n "${IPFS_REPROVIDER_INTERVAL}" ] && ipfs config Reprovider.Interval "${IPFS_REPROVIDER_INTERVAL}"
|
||||
[ -n "${IPFS_REPROVIDER_STRATEGY}" ] && ipfs config Reprovider.Strategy "${IPFS_REPROVIDER_STRATEGY}"
|
||||
|
||||
## routing
|
||||
[ -n "${IPFS_ROUTING_TYPE}" ] && ipfs config --json Routing.Type "${IPFS_ROUTING_TYPE}"
|
||||
[ -n "${IPFS_ROUTING_ACCELERATEDDHTCLIENT}" ] && ipfs config --json Routing.AcceleratedDHTClient "${IPFS_ROUTING_ACCELERATEDDHTCLIENT}"
|
||||
[ -n "${IPFS_ROUTING_LOOPBACKADDRESSESONLANDHT}" ] && ipfs config --bool Routing.LoopbackAddressesOnLanDHT "${IPFS_ROUTING_LOOPBACKADDRESSESONLANDHT}"
|
||||
[ -n "${IPFS_ROUTING_METHODS}" ] && ipfs config --json Routing.Methods "${IPFS_ROUTING_METHODS}"
|
||||
[ -n "${IPFS_ROUTING_ROUTERS}" ] && ipfs config --json Routing.Routers "${IPFS_ROUTING_ROUTERS}"
|
||||
|
||||
## swarm config
|
||||
[ -n "${IPFS_SWARM_ADDRFILTERS}" ] && ipfs config --json Swarm.AddrFilters "${IPFS_SWARM_ADDRFILTERS}"
|
||||
[ -n "${IPFS_DOCKER_NETWORK}" ] && ipfs config --json Swarm.AddrFilters "$(ipfs config Swarm.AddrFilters |sed '/${IPFS_DOCKER_NETWORK}"/d')"
|
||||
[ -n "${IPFS_SWARM_DISABLEBANDWIDTHMETRICS}" ] && ipfs config --bool Swarm.DisableBandwidthMetrics "${SWARM_DISABLEBANDWIDTHMETRICS}"
|
||||
[ -n "${IPFS_SWARM_DISABLENATPORTMAP}" ] && ipfs config --bool Swarm.DisableNatPortMap "${SWARM_DISABLENATPORTMAP}"
|
||||
[ -n "${IPFS_SWARM_ENABLEHOLEPUNCHING}" ] && ipfs config --json Swarm.EnableHolePunching "${SWARM_ENABLEHOLEPUNCHING}"
|
||||
[ -n "${IPFS_SWARM_RELAYCLIENT_ENABLED}" ] && ipfs config --json Swarm.RelayClient.Enabled "${SWARM_RELAYCLIENT_ENABLED}"
|
||||
[ -n "${IPFS_SWARM_RELAYCLIENT_STATICRELAYS}" ] && ipfs config --json Swarm.RelayClient.StaticRelays "${SWARM_RELAYCLIENT_STATICRELAYS}"
|
||||
[ -n "${IPFS_SWARM_RELAYSERVICE_ENABLED}" ] && ipfs config --json Swarm.RelayService.Enabled "${SWARM_RELAYSERVICE_ENABLED}"
|
||||
[ -n "${IPFS_SWARM_RELAYSERVICE_LIMIT}" ] && ipfs config --json Swarm.RelayService.Limit "${SWARM_RELAYSERVICE_LIMIT}"
|
||||
[ -n "${IPFS_SWARM_RELAYSERVICE_CONNECTIONDURATIONLIMIT}" ] && ipfs config Swarm.RelayService.ConnectionDurationLimit "${SWARM_RELAYSERVICE_CONNECTIONDURATIONLIMIT}"
|
||||
[ -n "${IPFS_SWARM_RELAYSERVICE_CONNECTIONDATALIMIT}" ] && ipfs config Swarm.RelayService.ConnectionDataLimit "${SWARM_RELAYSERVICE_CONNECTIONDATALIMIT}"
|
||||
[ -n "${IPFS_SWARM_RELAYSERVICE_RESERVATIONTTL}" ] && ipfs config Swarm.RelayService.ConnectionDataLimit "${SWARM_RELAYSERVICE_RESERVATIONTTL}"
|
||||
[ -n "${IPFS_SWARM_RELAYSERVICE_MAXRESERVATIONS}" ] && ipfs config Swarm.RelayService.MaxReservations "${SWARM_RELAYSERVICE_MAXRESERVATIONS}"
|
||||
[ -n "${IPFS_SWARM_RELAYSERVICE_MAXCIRCUITS}" ] && ipfs config Swarm.RelayService.MaxCircuits "${SWARM_RELAYSERVICE_MAXCIRCUITS}"
|
||||
[ -n "${IPFS_SWARM_RELAYSERVICE_BUFFERSIZE}" ] && ipfs config Swarm.RelayService.BufferSize "${SWARM_RELAYSERVICE_BUFFERSIZE}"
|
||||
[ -n "${IPFS_SWARM_RELAYSERVICE_MAXRESERVATIONSPERASN}" ] && ipfs config Swarm.RelayService.MaxReservationsPerASN "${SWARM_RELAYSERVICE_MAXRESERVATIONSPERASN}"
|
||||
[ -n "${IPFS_SWARM_RELAYSERVICE_MAXRESERVATIONSPERIP}" ] && ipfs config Swarm.RelayService.MaxReservationsPerIp "${SWARM_RELAYSERVICE_MAXRESERVATIONSPERIP}"
|
||||
[ -n "${IPFS_SWARM_CONNMGR_TYPE}" ] && ipfs config Swarm.ConnMgr.Type "${IPFS_SWARM_CONNMGR_TYPE}"
|
||||
[ -n "${IPFS_SWARM_CONNMGR_HIGHWATER}" ] && ipfs config Swarm.ConnMgr.HighWater "${IPFS_SWARM_CONNMGR_HIGHWATER}"
|
||||
[ -n "${IPFS_SWARM_CONNMGR_LOWWATER}" ] && ipfs config Swarm.ConnMgr.LowWater "${IPFS_SWARM_CONNMGR_LOWWATER}"
|
||||
[ -n "${IPFS_SWARM_CONNMGR_GRACEPERIOD}" ] && ipfs config Swarm.ConnMgr.GracePeriod "${IPFS_SWARM_CONNMGR_GRACEPERIOD}"
|
||||
[ -n "${IPFS_SWARM_RESOURCEMGR_ENABLED}" ] && ipfs config --json Swarm.ResourceMgr.Enabled "${IPFS_SWARM_RESOURCEMGR_ENABLED}"
|
||||
[ -n "${IPFS_SWARM_RESOURCEMGR_MAXMEMORY}" ] && ipfs config Swarm.ResourceMgr.MaxMemory "${IPFS_SWARM_RESOURCEMGR_MAXMEMORY}"
|
||||
[ -n "${IPFS_SWARM_RESOURCEMGR_MAXFILEDESCRIPTORS}" ] && ipfs config Swarm.ResourceMgr.MaxFileDescriptors "${IPFS_SWARM_RESOURCEMGR_MAXFILEDESCRIPTORS}"
|
||||
[ -n "${IPFS_SWARM_RESOURCEMGR_ALLOWLIST}" ] && ipfs config --json Swarm.ResourceMgr.Allowlist "${IPFS_SWARM_RESOURCEMGR_ALLOWLIST}"
|
||||
|
||||
## swarm transports
|
||||
[ -n "${IPFS_SWARM_TRANSPORTS_NETWORK_TCP}" ] && ipfs config --json Swarm.Transports.Network.TCP "${SWARM_TRANSPORTS_NETWORK_TCP}"
|
||||
[ -n "${IPFS_SWARM_TRANSPORTS_NETWORK_WEBSOCKET}" ] && ipfs config --json Swarm.Transports.Network.Websocket "${SWARM_TRANSPORTS_NETWORK_WEBSOCKET}"
|
||||
[ -n "${IPFS_SWARM_TRANSPORTS_NETWORK_QUIC}" ] && ipfs config --json Swarm.Transports.Network.QUIC "${SWARM_TRANSPORTS_NETWORK_QUIC}"
|
||||
[ -n "${IPFS_SWARM_TRANSPORTS_NETWORK_RELAY}" ] && ipfs config --json Swarm.Transports.Network.Relay "${SWARM_TRANSPORTS_NETWORK_RELAY}"
|
||||
[ -n "${IPFS_SWARM_TRANSPORTS_NETWORK_WEBTRANSPORT}" ] && ipfs config --json Swarm.Transports.Network.WebTransport "${SWARM_TRANSPORTS_NETWORK_WEBTRANSPORT}"
|
||||
[ -n "${IPFS_SWARM_TRANSPORTS_NETWORK_WEBRTCDIRECT}" ] && ipfs config --json Swarm.Transports.Network.WebRTCDirect "${SWARM_TRANSPORTS_NETWORK_WEBRTCDIRECT}"
|
||||
[ -n "${IPFS_SWARM_TRANSPORTS_NETWORK_WEBRTCDIRECT}" ] && ipfs config --json Swarm.Transports.Network.WebRTCDirect "${SWARM_TRANSPORTS_NETWORK_WEBRTCDIRECT}"
|
||||
[ -n "${IPFS_SWARM_TRANSPORTS_SECURITY_TLS}" ] && ipfs config Swarm.Transports.Security.TLS "${SWARM_TRANSPORTS_SECURITY_TLS}"
|
||||
[ -n "${IPFS_SWARM_TRANSPORTS_SECURITY_NOISE}" ] && ipfs config Swarm.Transports.Security.Noise "${SWARM_TRANSPORTS_SECURITY_NOISE}"
|
||||
[ -n "${IPFS_SWARM_TRANSPORTS_MULTIPLEXERS_YAMUX}" ] && ipfs config Swarm.Transports.Multiplexers.Yamux "${SWARM_TRANSPORTS_MULTIPLEXERS_YAMUX}"
|
||||
|
||||
## dns
|
||||
[ -n "${IPFS_DNS_RESOLVERS}" ] && ipfs config --json DNS.Resolvers "${IPFS_DNS_RESOLVERS}"
|
||||
[ -n "${IPFS_DNS_MAXCACHETTL}" ] && ipfs config DNS.MaxCacheTTL "${IPFS_DNS_MAXCACHETTL}"
|
||||
|
||||
## experimental features
|
||||
[ -n "${IPFS_EXPERIMENTAL_FILESTOREENABLED}" ] && ipfs config --json Experimental.FilestoreEnabled "${IPFS_EXPERIMENTAL_FILESTOREENABLED}"
|
||||
[ -n "${IPFS_EXPERIMENTAL_URLSTOREENABLED}" ] && ipfs config --json Experimental.UrlstoreEnabled "${IPFS_EXPERIMENTAL_URLSTOREENABLED}"
|
||||
[ -n "${IPFS_EXPERIMENTAL_URLSTORE}" ] && ipfs urlstore add "${IPFS_EXPERIMENTAL_URLSTORE}"
|
||||
[ -n "${IPFS_EXPERIMENTAL_LIBP2PSTREAMMOUNTING}" ] && ipfs config --json Experimental.Libp2pStreamMounting "${IPFS_EXPERIMENTAL_LIBP2PSTREAMMOUNTING}"
|
||||
[ -n "${IPFS_EXPERIMENTAL_P2PHTTPPROXY}" ] && ipfs config --json Experimental.P2pHttpProxy "${IPFS_EXPERIMENTAL_P2PHTTPPROXY}"
|
||||
[ -n "${IPFS_EXPERIMENTAL_STRATEGICPROVIDING}" ] && ipfs config --json Experimental.StrategicProviding "${IPFS_EXPERIMENTAL_STRATEGICPROVIDING}"
|
||||
[ -n "${IPFS_EXPERIMENTAL_OPTIMISTICPROVIDE}" ] && ipfs config --json Experimental.OptimisticProvide "${IPFS_EXPERIMENTAL_OPTIMISTICPROVIDE}"
|
||||
[ -n "${IPFS_EXPERIMENTAL_GATEWAYOVERLIBP2P}" ] && ipfs config --json Experimental.GatewayOverLibp2p "${IPFS_EXPERIMENTAL_GATEWAYOVERLIBP2P}"
|
||||
|
||||
## REMOVE IPFS BOOTSTRAP for private usage
|
||||
[ ${IPFS_NETWORK:-public} = "public" ] || ipfs bootstrap rm --all
|
||||
[ ${IPFS_NETWORK:-public} = "private" ] && export LIBP2P_FORCE_PNET=1 ||:
|
||||
@@ -1,19 +0,0 @@
|
||||
FROM mysql:5.6.44 as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
# config
|
||||
COPY ${DOCKER_BUILD_DIR}/conf.d/all.cnf /etc/mysql/conf.d/
|
||||
|
||||
# install goss
|
||||
ADD https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 /usr/bin/goss
|
||||
RUN chmod +rx /usr/bin/goss
|
||||
COPY ${DOCKER_BUILD_DIR}/goss.yml /tests/goss.yml
|
||||
|
||||
HEALTHCHECK CMD goss -g /tests/goss.yml validate --format tap
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
# config
|
||||
COPY ${DOCKER_BUILD_DIR}/conf.d/master.cnf /etc/mysql/conf.d/
|
||||
@@ -1,22 +0,0 @@
|
||||
[mysqld]
|
||||
binlog_cache_size = 32768
|
||||
character_set_server = utf8mb4
|
||||
collation_server = utf8mb4_unicode_ci
|
||||
innodb_file_per_table = 1
|
||||
innodb_flush_method = O_DIRECT
|
||||
innodb_log_buffer_size = 8388608
|
||||
innodb_log_file_size = 134217728
|
||||
key_buffer_size = 16777216
|
||||
# local_infile = 1
|
||||
log_bin_trust_function_creators = 1
|
||||
log_output = FILE
|
||||
max_allowed_packet = 1G
|
||||
max_binlog_size = 128M
|
||||
query_cache_limit = 16M
|
||||
query_cache_size = 128M
|
||||
query_cache_type = 1
|
||||
read_buffer_size = 262144
|
||||
read_rnd_buffer_size = 524288
|
||||
slow_query_log = 1
|
||||
table_open_cache_instances = 16
|
||||
wait_timeout = 31536000
|
||||
@@ -1,8 +0,0 @@
|
||||
[mysqld]
|
||||
innodb_buffer_pool_size = 1G
|
||||
max_connections = 128
|
||||
sort_buffer_size = 1M
|
||||
|
||||
innodb_strict_mode = 1
|
||||
local_infile = 0
|
||||
; sql-mode = "TRADITIONAL"
|
||||
@@ -1,23 +0,0 @@
|
||||
file:
|
||||
/usr/sbin/mysqld:
|
||||
exists: true
|
||||
filetype: file
|
||||
mode: "0755"
|
||||
owner: root
|
||||
sha256: bf5ba9081d08792048ef8459e1ea6ddd155b82bc1a22cd5c8666e47050cd6208
|
||||
package:
|
||||
mysql-server:
|
||||
installed: true
|
||||
mysql-common:
|
||||
installed: true
|
||||
port:
|
||||
tcp6:3306:
|
||||
listening: true
|
||||
ip:
|
||||
process:
|
||||
mysqld:
|
||||
running: true
|
||||
user:
|
||||
mysql:
|
||||
exists: true
|
||||
uid: 999
|
||||
@@ -1,13 +0,0 @@
|
||||
FROM pinidh/nginx-proxy:alpine
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
RUN sed -i 's/\(function _resolvers() {\)$/function _nginx_config() {\n\t\/app\/nginx-config.sh\n}\n\n\1/;s/\(\t_default_certificate\)$/\1\n\n\t_nginx_config/' /app/docker-entrypoint.sh \
|
||||
&& sed -i 's|\(include /etc/nginx/vhost.d/default_location;\)|\1\n {{- end }}\n {{- if (and (exists "/etc/nginx/vhost.d/default_location_php") ($.Env.DEFAULT_LOCATION_PHP)) }}\n include /etc/nginx/vhost.d/default_location_php;\n {{- end }}\n {{- if (and (exists "/etc/nginx/vhost.d/default_location_ipfs") ($.Env.DEFAULT_LOCATION_IPFS)) }}\n include /etc/nginx/vhost.d/default_location_ipfs;|' /app/nginx.tmpl \
|
||||
&& sed -i 's|\( return 503;\)$|{{- if (exists (printf "/etc/nginx/vhost.d/%s" (or $.Env.DEFAULT "default"))) }}\n include {{ (printf "/etc/nginx/vhost.d/%s" (or $.Env.DEFAULT "default")) }};\n{{- if (and (exists "/etc/nginx/vhost.d/default_location") ($.Env.DEFAULT_LOCATION)) }}\n include /etc/nginx/vhost.d/default_location;\n{{- end }}\n{{- if (and (exists "/etc/nginx/vhost.d/default_location_php") ($.Env.DEFAULT_LOCATION_PHP)) }}\n include /etc/nginx/vhost.d/default_location_php;\n{{- end }}\n{{- if (and (exists "/etc/nginx/vhost.d/default_location_ipfs") ($.Env.DEFAULT_LOCATION_IPFS)) }}\n include /etc/nginx/vhost.d/default_location_ipfs;\n{{- end }}\n{{- else }}\n\1\n{{- end }}|' /app/nginx.tmpl \
|
||||
&& sed -i 's|\({{-\? if (exists "/etc/nginx/proxy.conf") }}\)|{{- if (exists "/etc/nginx/vhost.d/nginx.conf") }}\ninclude /etc/nginx/vhost.d/nginx.conf;\n{{ end }}\n\n\1|' /app/nginx.tmpl \
|
||||
&& sed -i 's|exists "/etc/nginx/vhost.d/default"|exists (printf "/etc/nginx/vhost.d/%s" (or $.Env.DEFAULT "default"))|;s|include /etc/nginx/vhost.d/default;|include {{ (printf "/etc/nginx/vhost.d/%s" (or $.Env.DEFAULT "default")) }};|' /app/nginx.tmpl \
|
||||
&& awk '/proxy_pass \{\{ trim .Proto \}\}/{sub(/else/, "else if ne .Proto \"local\"", last)} NR>1{print last} {last=$0} END {print last}' /app/nginx.tmpl > /tmp/nginx.tmpl && mv /tmp/nginx.tmpl /app/
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/nginx* /app
|
||||
|
||||
HEALTHCHECK CMD curl -sk https://localhost > /dev/null && echo OK
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
##
|
||||
# CONFIG
|
||||
|
||||
sed -i 's/fastcgi_param * SERVER_SOFTWARE *.*/fastcgi_param SERVER_SOFTWARE nstix;/' /etc/nginx/fastcgi_params
|
||||
|
||||
##
|
||||
# DEFAULT
|
||||
|
||||
mkdir -p /etc/nginx/htpasswd /etc/nginx/vhost.d
|
||||
[ -f "/etc/nginx/htpasswd/default" ] || echo "default:{PLAIN}$(head -c 15 /dev/random |base64)" > /etc/nginx/htpasswd/default
|
||||
[ -f "/etc/nginx/vhost.d/default" ] || cp /app/nginx_default /etc/nginx/vhost.d/default
|
||||
[ -f "/etc/nginx/vhost.d/default_dns" ] || cp /app/nginx_default_dns /etc/nginx/vhost.d/default_dns
|
||||
[ -f "/etc/nginx/vhost.d/default_location" ] || cp /app/nginx_default_location /etc/nginx/vhost.d/default_location
|
||||
[ -f "/etc/nginx/vhost.d/default_location_php" ] || cp /app/nginx_default_location_php /etc/nginx/vhost.d/default_location_php
|
||||
[ -f "/etc/nginx/vhost.d/default_location_ipfs" ] || cp /app/nginx_default_location_ipfs /etc/nginx/vhost.d/default_location_ipfs
|
||||
[ -f "/etc/nginx/vhost.d/nginx.conf" ] || cp /app/nginx.conf /etc/nginx/vhost.d/nginx.conf
|
||||
@@ -1,16 +0,0 @@
|
||||
map $host $host_dir {
|
||||
hostnames;
|
||||
~(?:(?<sssssd>[a-z0-9-]+)\.)(?:(?<ssssd>[a-z0-9-]+)\.)(?:(?<sssd>[a-z0-9-]+)\.)(?:(?<ssd>[a-z0-9-]+)\.)(?:(?<sd>[a-z0-9-]+)\.)(?<dom>[a-z0-9-]+)\.(?<tld>[a-z0-9-]+)$ ${tld}/${dom}/${sd}/${ssd}/${sssd}/${ssssd}/${sssssd};
|
||||
~(?:(?<ssssd>[a-z0-9-]+)\.)(?:(?<sssd>[a-z0-9-]+)\.)(?:(?<ssd>[a-z0-9-]+)\.)(?:(?<sd>[a-z0-9-]+)\.)(?<dom>[a-z0-9-]+)\.(?<tld>[a-z0-9-]+)$ ${tld}/${dom}/${sd}/${ssd}/${sssd}/${ssssd};
|
||||
~(?:(?<sssd>[a-z0-9-]+)\.)(?:(?<ssd>[a-z0-9-]+)\.)(?:(?<sd>[a-z0-9-]+)\.)(?<dom>[a-z0-9-]+)\.(?<tld>[a-z0-9-]+)$ ${tld}/${dom}/${sd}/${ssd}/${sssd};
|
||||
~(?:(?<ssd>[a-z0-9-]+)\.)(?:(?<sd>[a-z0-9-]+)\.)(?<dom>[a-z0-9-]+)\.(?<tld>[a-z0-9-]+)$ ${tld}/${dom}/${sd}/${ssd};
|
||||
~(?:(?<sd>[a-z0-9-]+)\.)(?<dom>[a-z0-9-]+)\.(?<tld>[a-z0-9-]+)$ ${tld}/${dom}/${sd};
|
||||
~(?<dom>[a-z0-9-]+)\.(?<tld>[a-z0-9-]+)$ ${tld}/${dom};
|
||||
}
|
||||
|
||||
set_real_ip_from 192.168.0.0/16;
|
||||
set_real_ip_from 172.16.0.0/12;
|
||||
set_real_ip_from 10.0.0.0/8;
|
||||
set_real_ip_from 2001:0db8::/32;
|
||||
real_ip_header X-Forwarded-For;
|
||||
real_ip_recursive on;
|
||||
@@ -1 +0,0 @@
|
||||
root /var/www/$host;
|
||||
@@ -1 +0,0 @@
|
||||
root /dns/$host_dir;
|
||||
@@ -1,23 +0,0 @@
|
||||
error_page 403 /localhost/403.html;
|
||||
error_page 404 /localhost/404.html;
|
||||
error_page 500 /localhost/500.html;
|
||||
error_page 502 503 504 /localhost/50x.html;
|
||||
index index.php index.html index.htm;
|
||||
try_files $uri $uri/ =404;
|
||||
|
||||
location /localhost/ {
|
||||
alias /usr/share/nginx/html/;
|
||||
}
|
||||
|
||||
location ^~ /.well-known/acme-challenge/ {
|
||||
auth_basic off;
|
||||
auth_request off;
|
||||
allow all;
|
||||
root /usr/share/nginx/html;
|
||||
try_files $uri =404;
|
||||
break;
|
||||
}
|
||||
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
location ~ /ip(f|n)s {
|
||||
proxy_pass http://$host:8080;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
location ~ ^(.+\.php)(.*)$ {
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_pass php;
|
||||
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
||||
include fastcgi_params;
|
||||
try_files $uri index.php$uri =404;
|
||||
}
|
||||
|
||||
fastcgi_intercept_errors on;
|
||||
@@ -1,49 +0,0 @@
|
||||
FROM alpine:latest as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
RUN apk --no-cache add libffi openssl python3 py3-pip py3-netifaces
|
||||
|
||||
RUN apk --no-cache add --virtual .build-deps \
|
||||
build-base \
|
||||
libffi-dev \
|
||||
openssl-dev \
|
||||
python3-dev \
|
||||
&& pip install --upgrade pip \
|
||||
&& pip install python-openstackclient \
|
||||
&& apk del .build-deps
|
||||
|
||||
RUN apk --no-cache upgrade
|
||||
|
||||
ENTRYPOINT ["/usr/bin/openstack"]
|
||||
CMD ["help"]
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG UID
|
||||
ARG USER
|
||||
ENV UID=${UID}
|
||||
ENV GID=${UID}
|
||||
ENV USER=${USER}
|
||||
|
||||
# If we provide a numeric UID
|
||||
RUN [ "$UID" -eq "$UID" ] 2>/dev/null \
|
||||
# Remove user with $UID if it is not our $USER
|
||||
&& if [ "$(getent passwd $UID |awk -F: '{print $1}')" != "$USER" ]; then \
|
||||
sed -i '/^'$(getent passwd $UID |awk -F: '{print $1}')':x:'$UID':/d' /etc/passwd; \
|
||||
sed -i '/^'$(getent group $GID |awk -F: '{print $1}')':x:'$GID':/d' /etc/group; \
|
||||
fi \
|
||||
# Force $UID if our $USER already exists
|
||||
&& sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \
|
||||
&& sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \
|
||||
# Create $USER if it does not exist
|
||||
&& if [ "$(getent passwd $UID)" = "" ]; then \
|
||||
echo "$USER:x:$UID:$GID::/home/$USER:$SHELL" >> /etc/passwd; \
|
||||
echo "$USER:\!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \
|
||||
echo "$USER:x:$GID:" >> /etc/group; \
|
||||
fi \
|
||||
&& mkdir -p /home/$USER \
|
||||
&& chown $UID:$GID /home/$USER \
|
||||
|| true
|
||||
|
||||
USER $USER
|
||||
@@ -1,66 +0,0 @@
|
||||
FROM alpine:latest as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
ARG DOCKER_SYSTEM="Linux"
|
||||
ARG DOCKER_MACHINE="x86_64"
|
||||
|
||||
RUN apk --no-cache add \
|
||||
ansible \
|
||||
bash \
|
||||
dirmngr \
|
||||
git \
|
||||
gpg \
|
||||
gpg-agent \
|
||||
qemu \
|
||||
qemu-system-x86_64 \
|
||||
qemu-img \
|
||||
openssh-client \
|
||||
openssl \
|
||||
socat \
|
||||
wget
|
||||
|
||||
ARG PACKER_VERSION=1.8.3
|
||||
|
||||
RUN OS="$(echo ${DOCKER_SYSTEM} |awk '{print tolower($0)}')" \
|
||||
&& ARCH="$(echo ${DOCKER_MACHINE} |awk '{print /x86_64/ ? "amd64" : /arch64/ ? "arm64" : /armv(6|7)/ ? "arm" : $0}')" \
|
||||
&& wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_${OS}_${ARCH}.zip \
|
||||
&& wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_SHA256SUMS \
|
||||
&& wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_SHA256SUMS.sig \
|
||||
&& GNUPGHOME="./.gnupg" gpg --batch --recv-keys C874011F0AB405110D02105534365D9472D7468F \
|
||||
&& GNUPGHOME="./.gnupg" gpg --batch --verify packer_${PACKER_VERSION}_SHA256SUMS.sig packer_${PACKER_VERSION}_SHA256SUMS \
|
||||
&& grep packer_${PACKER_VERSION}_${OS}_${ARCH}.zip packer_${PACKER_VERSION}_SHA256SUMS |sha256sum -c - \
|
||||
&& unzip "packer_${PACKER_VERSION}_${OS}_${ARCH}.zip" -d /usr/local/bin \
|
||||
&& rm -rf "packer_${PACKER_VERSION}_${OS}_${ARCH}.zip" packer_${PACKER_VERSION}_SHA256SUMS.sig packer_${PACKER_VERSION}_SHA256SUMS ./.gnupg
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/packer"]
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG UID
|
||||
ARG USER
|
||||
ENV UID=${UID}
|
||||
ENV GID=${UID}
|
||||
ENV USER=${USER}
|
||||
|
||||
# If we provide a specific UID
|
||||
RUN let $UID >/dev/null 2>&1 \
|
||||
# Remove user with $UID if it is not our $USER
|
||||
&& if [ "$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')" != "$USER" ]; then \
|
||||
sed -i '/^'$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')':x:'$UID':/d' /etc/passwd; \
|
||||
sed -i '/^'$(getent group $GID |awk 'BEGIN {FS=":"} {print $1}')':x:'$GID':/d' /etc/group; \
|
||||
fi \
|
||||
# Force $UID if our $USER already exists
|
||||
&& sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \
|
||||
&& sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \
|
||||
# Create $USER if it does not exist
|
||||
&& if [ "$(getent passwd $UID)" = "" ]; then \
|
||||
echo "$USER:x:$UID:$GID::/home/$USER:/bin/false" >> /etc/passwd; \
|
||||
echo "$USER:!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \
|
||||
echo "$USER:x:$GID:" >> /etc/group; \
|
||||
fi \
|
||||
&& mkdir -p /home/$USER \
|
||||
&& chown $UID:$GID /home/$USER \
|
||||
|| true
|
||||
|
||||
USER $USER
|
||||
@@ -1,12 +0,0 @@
|
||||
; DO NOT EDIT (unless you know what you are doing)
|
||||
;
|
||||
; This subdirectory is a git "subrepo", and this file is maintained by the
|
||||
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
||||
;
|
||||
[subrepo]
|
||||
remote = ssh://git@github.com/aynicos/docker-pdns-server
|
||||
branch = master
|
||||
commit = 6d3c4ce70cbb38d237be757206bfbf082ce2ba3e
|
||||
parent = 9de6b77b0d944fe6efa7b020ba7c2dbbba5df4f8
|
||||
method = merge
|
||||
cmdver = 0.4.0
|
||||
@@ -1,67 +0,0 @@
|
||||
FROM alpine:3.11 as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG VERSION_PDNS_REC=4.2.1
|
||||
ARG VERSION_PDNS_AUTH=4.2.1
|
||||
ARG VERSION_PDNS_DNSDIST=1.4.0
|
||||
|
||||
RUN apk upgrade --no-cache \
|
||||
&& apk add --no-cache --virtual .build-deps \
|
||||
autoconf \
|
||||
automake \
|
||||
bison \
|
||||
boost-dev \
|
||||
boost-program_options \
|
||||
boost-serialization \
|
||||
build-base \
|
||||
curl \
|
||||
curl-dev \
|
||||
file \
|
||||
flex \
|
||||
g++ \
|
||||
git \
|
||||
py-virtualenv \
|
||||
libedit-dev \
|
||||
libressl-dev \
|
||||
libstdc++ \
|
||||
libtool \
|
||||
lua-dev \
|
||||
make \
|
||||
musl \
|
||||
ragel \
|
||||
&& git clone https://github.com/PowerDNS/pdns \
|
||||
&& cd pdns \
|
||||
&& git checkout tags/auth-${VERSION_PDNS_AUTH} -b auth-${VERSION_PDNS_AUTH} \
|
||||
&& autoreconf -vi \
|
||||
&& ./configure --enable-static --disable-systemd --without-systemd --with-modules="" \
|
||||
&& make install clean \
|
||||
&& git checkout tags/rec-${VERSION_PDNS_REC} -b rec-${VERSION_PDNS_REC} \
|
||||
&& cd pdns/recursordist \
|
||||
&& autoreconf -vi \
|
||||
&& ./configure --enable-static --disable-systemd --without-systemd \
|
||||
&& make install clean \
|
||||
&& cd ../.. \
|
||||
&& git checkout tags/dnsdist-${VERSION_PDNS_DNSDIST} -b dnsdist-${VERSION_PDNS_DNSDIST} \
|
||||
&& cd pdns/dnsdistdist \
|
||||
&& autoreconf -vi \
|
||||
&& ./configure --enable-static --disable-systemd --without-systemd \
|
||||
&& make install clean \
|
||||
&& cd ../../.. \
|
||||
&& rm -fr pdns \
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner --recursive /usr/local \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
| xargs -r apk info --installed \
|
||||
| sort -u \
|
||||
)" \
|
||||
&& apk del .build-deps \
|
||||
&& apk add --no-cache --virtual .run-deps $runDeps \
|
||||
lua
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh /
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
EXPOSE 53/udp 53/tcp
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
@@ -1,22 +0,0 @@
|
||||
# docker-pdns
|
||||
|
||||
Alpine based Dockerfile running a powerdns authoritative and/or recursive DNS server.
|
||||
|
||||
## Usage
|
||||
|
||||
Following environment variables can be customized.
|
||||
|
||||
## Example
|
||||
|
||||
Build a docker image named "pdns".
|
||||
|
||||
```shell
|
||||
$ docker build -t pdns .
|
||||
```
|
||||
|
||||
Start a docker from this image.
|
||||
|
||||
```shell
|
||||
$ docker run --net host pdns
|
||||
```
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/ash
|
||||
set -euo pipefail
|
||||
set -o errexit
|
||||
|
||||
trap 'kill -SIGQUIT $PID' INT
|
||||
|
||||
# Launch pdns_recursor by default
|
||||
[ $# -eq 0 ] && /usr/local/sbin/pdns_recursor || exec "$@" &
|
||||
PID=$! && wait
|
||||
@@ -1,11 +0,0 @@
|
||||
FROM phabricator/daemon:latest as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
openssh-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
@@ -1,10 +0,0 @@
|
||||
FROM phabricator/phabricator:latest as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
RUN { \
|
||||
echo 'mysqli.allow_local_infile = 0'; \
|
||||
} > /usr/local/etc/php/conf.d/mysql.ini
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
@@ -1,239 +0,0 @@
|
||||
FROM php:5.6-fpm-alpine as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG AMQP_VERSION=stable
|
||||
ARG APCU_VERSION=4.0.11
|
||||
ARG BLACKFIRE_VERSION=1.31.0
|
||||
ARG CACHETOOL_VERSION=3.2.1
|
||||
ARG IMAGICK_VERSION=stable
|
||||
ARG GEOIP_VERSION=stable
|
||||
ARG MEMCACHE_VERSION=3.0.8
|
||||
ARG MEMCACHED_VERSION=2.2.0
|
||||
ARG MONGODB_VERSION=1.6.1
|
||||
ARG NEWRELIC_VERSION=9.6.1.256
|
||||
ARG RAR_VERSION=stable
|
||||
ARG REDIS_VERSION=4.3.0
|
||||
ARG UUID_VERSION=1.0.4
|
||||
ARG SUHOSIN_VERSION=0.9.38
|
||||
ARG TWIG_VERSION=1.35.3
|
||||
ARG XCACHE_VERSION=3.2.0
|
||||
ARG XDEBUG_VERSION=2.5.5
|
||||
|
||||
RUN apk --no-cache upgrade \
|
||||
&& apk add --no-cache --virtual .build-deps \
|
||||
$PHPIZE_DEPS \
|
||||
aspell-dev \
|
||||
bison \
|
||||
bzip2-dev \
|
||||
curl-dev \
|
||||
flex \
|
||||
freetype-dev \
|
||||
gawk \
|
||||
geoip-dev \
|
||||
gettext-dev \
|
||||
gmp-dev \
|
||||
icu-dev \
|
||||
imagemagick-dev \
|
||||
imap-dev \
|
||||
libjpeg-turbo-dev \
|
||||
libmcrypt-dev \
|
||||
libmemcached-dev \
|
||||
libpng-dev \
|
||||
libressl-dev \
|
||||
libxml2-dev \
|
||||
libxslt-dev \
|
||||
make \
|
||||
net-snmp-dev \
|
||||
openldap-dev \
|
||||
postgresql-dev \
|
||||
python \
|
||||
rabbitmq-c-dev \
|
||||
zlib-dev \
|
||||
&& wget https://packages.blackfire.io/binaries/blackfire-php/${BLACKFIRE_VERSION}/blackfire-php-alpine_amd64-php-$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;").so -O $(php -r "echo ini_get('extension_dir');")/blackfire.so \
|
||||
&& wget https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz -O /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz \
|
||||
&& mkdir -p /tmp/newrelic-${NEWRELIC_VERSION} \
|
||||
&& tar xzf /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz -C /tmp/newrelic-${NEWRELIC_VERSION} --strip-components=1 \
|
||||
&& rm /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz \
|
||||
&& mv /tmp/newrelic-${NEWRELIC_VERSION}/agent/x64/newrelic-20131226.so $(php -r "echo ini_get('extension_dir');")/newrelic.so \
|
||||
&& wget --no-check-certificate https://download.suhosin.org/suhosin-${SUHOSIN_VERSION}.tar.gz -O /tmp/suhosin-${SUHOSIN_VERSION}.tar.gz \
|
||||
&& mkdir -p /tmp/suhosin-${SUHOSIN_VERSION} \
|
||||
&& tar xzf /tmp/suhosin-${SUHOSIN_VERSION}.tar.gz -C /tmp/suhosin-${SUHOSIN_VERSION} --strip-components=1 \
|
||||
&& rm /tmp/suhosin-${SUHOSIN_VERSION}.tar.gz \
|
||||
&& cd /tmp/suhosin-${SUHOSIN_VERSION} \
|
||||
&& sed -i '1i#include <sys/file.h>' log.c \
|
||||
&& wget https://github.com/twigphp/Twig/archive/v${TWIG_VERSION}.tar.gz -O /tmp/twig-${TWIG_VERSION}.tar.gz \
|
||||
&& mkdir -p /tmp/twig-${TWIG_VERSION} \
|
||||
&& tar xzf /tmp/twig-${TWIG_VERSION}.tar.gz -C /tmp/twig-${TWIG_VERSION} --strip-components=1 \
|
||||
&& rm /tmp/twig-${TWIG_VERSION}.tar.gz \
|
||||
&& wget https://web.archive.org/web/20181118151821if_/http://xcache.lighttpd.net/pub/Releases/${XCACHE_VERSION}/xcache-${XCACHE_VERSION}.tar.gz -O /tmp/xcache-${XCACHE_VERSION}.tar.gz \
|
||||
&& mkdir -p /tmp/xcache-${XCACHE_VERSION} \
|
||||
&& tar xzf /tmp/xcache-${XCACHE_VERSION}.tar.gz -C /tmp/xcache-${XCACHE_VERSION} --strip-components=1 \
|
||||
&& rm /tmp/xcache-${XCACHE_VERSION}.tar.gz \
|
||||
&& docker-php-ext-configure /tmp/xcache-${XCACHE_VERSION} --enable-xcache --enable-xcache-constant --enable-xcache-optimizer --enable-xcache-coverager \
|
||||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ \
|
||||
&& docker-php-ext-install -j$(nproc) \
|
||||
/tmp/suhosin-${SUHOSIN_VERSION} \
|
||||
/tmp/twig-${TWIG_VERSION}/ext/twig \
|
||||
/tmp/xcache-${XCACHE_VERSION} \
|
||||
bcmath \
|
||||
bz2 \
|
||||
calendar \
|
||||
dba \
|
||||
exif \
|
||||
gd \
|
||||
gettext \
|
||||
gmp \
|
||||
imap \
|
||||
intl \
|
||||
ldap \
|
||||
mcrypt \
|
||||
mysql \
|
||||
mysqli \
|
||||
opcache \
|
||||
pcntl \
|
||||
pdo_mysql \
|
||||
pdo_pgsql \
|
||||
pgsql \
|
||||
pspell \
|
||||
shmop \
|
||||
snmp \
|
||||
soap \
|
||||
sockets \
|
||||
sysvmsg \
|
||||
sysvsem \
|
||||
sysvshm \
|
||||
xmlrpc \
|
||||
xsl \
|
||||
zip \
|
||||
&& rm /usr/local/etc/php/conf.d/docker-php-ext-* \
|
||||
&& rm -rf /tmp/newrelic-* \
|
||||
&& rm -rf /tmp/suhosin-* \
|
||||
&& rm -rf /tmp/twig-* \
|
||||
&& rm -rf /tmp/xcache-* \
|
||||
&& pecl install amqp-${AMQP_VERSION} \
|
||||
&& pecl install apcu-${APCU_VERSION} \
|
||||
&& pecl install geoip-${GEOIP_VERSION} \
|
||||
&& pecl install imagick-${IMAGICK_VERSION} \
|
||||
&& pecl install memcache-${MEMCACHE_VERSION} \
|
||||
&& pecl install memcached-${MEMCACHED_VERSION} \
|
||||
&& pecl install mongodb-${MONGODB_VERSION} \
|
||||
&& pecl install rar-${RAR_VERSION} \
|
||||
&& pecl install redis-${REDIS_VERSION} \
|
||||
&& echo |pecl install uuid-${UUID_VERSION} \
|
||||
&& pecl install xdebug-${XDEBUG_VERSION} \
|
||||
&& pecl clear-cache \
|
||||
&& runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
||||
| tr ',' '\n' \
|
||||
| sort -u \
|
||||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||
)" \
|
||||
&& apk del .build-deps \
|
||||
&& apk add --no-cache --virtual .run-deps $runDeps
|
||||
|
||||
RUN wget http://gordalina.github.io/cachetool/downloads/cachetool-${CACHETOOL_VERSION}.phar -O /usr/local/bin/cachetool \
|
||||
&& chmod +x /usr/local/bin/cachetool \
|
||||
&& echo -e "\
|
||||
adapter: fastcgi \n\
|
||||
fastcgi: 127.0.0.1:9000 \n\
|
||||
" > /etc/cachetool.yml
|
||||
|
||||
RUN mkdir -p /etc/ssh && echo -e "\
|
||||
Host * \n\
|
||||
Compression yes \n\
|
||||
" >> /etc/ssh/ssh_config
|
||||
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
bzip2 \
|
||||
coreutils \
|
||||
gettext \
|
||||
git \
|
||||
imagemagick \
|
||||
lftp \
|
||||
mailx \
|
||||
make \
|
||||
mysql-client \
|
||||
nano \
|
||||
openssh-client \
|
||||
ssmtp \
|
||||
vim
|
||||
|
||||
# Iconv fix: https://github.com/docker-library/php/issues/240#issuecomment-305038173
|
||||
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ gnu-libiconv
|
||||
ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so
|
||||
|
||||
# enable php modules
|
||||
# available modules : amqp apcu bcmath blackfire bz2 calendar curl dba exif gettext gd geoip gmp imap imagick intl json ldap mbstring mcrypt memcache memcached mongodb mysql mysqli newrelic opcache pcntl pdo_mysql pdo_pgsql pgsql pspell rar redis shmop simplexml snmp soap sockets suhosin sysvmsg sysvsem sysvshm tokenizer twig uuid xcache xdebug xmlrpc xsl zip
|
||||
# fix: disabled memcache to avoid relocation errors
|
||||
ARG PHP_EXT_ENABLE="amqp apcu bcmath blackfire bz2 calendar gd geoip imagick intl mcrypt memcached mysql mysqli opcache pdo_mysql redis soap sockets twig uuid zip"
|
||||
RUN docker-php-ext-enable ${PHP_EXT_ENABLE}
|
||||
|
||||
# copy *.ini
|
||||
COPY ${DOCKER_BUILD_DIR}/*.ini /usr/local/etc/php/conf.d/
|
||||
COPY ${DOCKER_BUILD_DIR}/php-fpm-*.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
# custom php config
|
||||
ARG PHP_INI_CONFIG
|
||||
RUN echo -e ${PHP_INI_CONFIG// /\\n} >> /usr/local/etc/php/conf.d/config.ini
|
||||
|
||||
# custom php cli
|
||||
ARG PHP_CLI_CONFIG="apc.enable_cli=0 max_execution_time=-1 memory_limit=-1 opcache.enable_cli=0 xdebug.default_enable=0"
|
||||
RUN echo '#!/usr/bin/env sh' > /usr/local/bin/php-cli \
|
||||
&& chmod +x /usr/local/bin/php-cli \
|
||||
&& echo -e "\
|
||||
/usr/local/bin/php -d ${PHP_CLI_CONFIG// / -d } \"\$@\"\
|
||||
" >> /usr/local/bin/php-cli
|
||||
|
||||
# install cronlock
|
||||
ADD https://raw.github.com/kvz/cronlock/master/cronlock /usr/bin/cronlock
|
||||
RUN chmod +rx /usr/bin/cronlock
|
||||
|
||||
# config ssmtp
|
||||
RUN echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf
|
||||
|
||||
# https://bugs.php.net/bug.php?id=71880
|
||||
ENV LOG_STREAM="/tmp/stdout"
|
||||
RUN mkfifo $LOG_STREAM && chmod 777 $LOG_STREAM
|
||||
|
||||
# default www-data homedir to /var/www for crontabs
|
||||
RUN sed -i 's|/home/www-data|/var/www|' /etc/passwd
|
||||
WORKDIR /var/www
|
||||
|
||||
# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env
|
||||
CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ]
|
||||
|
||||
FROM dist as master
|
||||
ARG UID
|
||||
ARG USER
|
||||
ENV UID=${UID}
|
||||
ENV GID=${UID}
|
||||
ENV USER=${USER}
|
||||
|
||||
# If we provide a specific UID
|
||||
RUN let $UID >/dev/null 2>&1 \
|
||||
# Remove user with $UID if it is not our $USER
|
||||
&& if [ "$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')" != "$USER" ]; then \
|
||||
sed -i '/^'$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')':x:'$UID':/d' /etc/passwd; \
|
||||
sed -i '/^'$(getent group $GID |awk 'BEGIN {FS=":"} {print $1}')':x:'$GID':/d' /etc/group; \
|
||||
fi \
|
||||
# Force $UID if our $USER already exists
|
||||
&& sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \
|
||||
&& sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \
|
||||
# Create $USER if it does not exist
|
||||
&& if [ "$(getent passwd $UID)" = "" ]; then \
|
||||
echo "$USER:x:$UID:$GID::/home/$USER:/bin/false" >> /etc/passwd; \
|
||||
echo "$USER:!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \
|
||||
echo "$USER:x:$GID:" >> /etc/group; \
|
||||
fi \
|
||||
&& mkdir -p /home/$USER \
|
||||
&& chown $UID:$GID /home/$USER \
|
||||
|| true
|
||||
|
||||
RUN chown -R $USER /usr/local/etc/php/conf.d/
|
||||
|
||||
USER $USER
|
||||
|
||||
ARG SSH_REMOTE_HOSTS
|
||||
|
||||
RUN mkdir -p ~/.ssh \
|
||||
&& ssh-keyscan -t rsa -H $SSH_REMOTE_HOSTS >> ~/.ssh/known_hosts
|
||||
@@ -1,5 +0,0 @@
|
||||
apc.enable_cli = 0
|
||||
apc.enabled = 1
|
||||
apc.shm_segments = 1
|
||||
apc.shm_size = 32M
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
blackfire.agent_socket=tcp://blackfire:8707
|
||||
@@ -1,4 +0,0 @@
|
||||
[newrelic]
|
||||
newrelic.logfile = /dev/self/fd/2
|
||||
newrelic.daemon.logfile = /dev/self/fd/2
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
opcache.enable = 1
|
||||
opcache.enable_cli = 0
|
||||
opcache.error_log = /proc/self/fd/2
|
||||
opcache.interned_strings_buffer = 16
|
||||
opcache.log_verbosity_level = 2
|
||||
opcache.max_accelerated_files = 20000
|
||||
opcache.memory_consumption = 256
|
||||
opcache.validate_timestamps = 1
|
||||
@@ -1,412 +0,0 @@
|
||||
; Start a new pool named 'www'.
|
||||
; the variable $pool can we used in any directive and will be replaced by the
|
||||
; pool name ('www' here)
|
||||
[www]
|
||||
|
||||
; Per pool prefix
|
||||
; It only applies on the following directives:
|
||||
; - 'access.log'
|
||||
; - 'slowlog'
|
||||
; - 'listen' (unixsocket)
|
||||
; - 'chroot'
|
||||
; - 'chdir'
|
||||
; - 'php_values'
|
||||
; - 'php_admin_values'
|
||||
; When not set, the global prefix (or /usr) applies instead.
|
||||
; Note: This directive can also be relative to the global prefix.
|
||||
; Default Value: none
|
||||
;prefix = /path/to/pools/$pool
|
||||
|
||||
; Unix user/group of processes
|
||||
; Note: The user is mandatory. If the group is not set, the default user's group
|
||||
; will be used.
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
; The address on which to accept FastCGI requests.
|
||||
; Valid syntaxes are:
|
||||
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
|
||||
; a specific port;
|
||||
; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
|
||||
; a specific port;
|
||||
; 'port' - to listen on a TCP socket to all IPv4 addresses on a
|
||||
; specific port;
|
||||
; '[::]:port' - to listen on a TCP socket to all addresses
|
||||
; (IPv6 and IPv4-mapped) on a specific port;
|
||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
; Note: This value is mandatory.
|
||||
;listen = /var/run/php5-fpm.sock
|
||||
listen = 0.0.0.0:9000
|
||||
|
||||
; Set listen(2) backlog.
|
||||
; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
|
||||
listen.backlog = 1023
|
||||
|
||||
; Set permissions for unix socket, if one is used. In Linux, read/write
|
||||
; permissions must be set in order to allow connections from a web server. Many
|
||||
; BSD-derived systems allow connections regardless of permissions.
|
||||
; Default Values: user and group are set as the running user
|
||||
; mode is set to 0660
|
||||
;listen.owner = www-data
|
||||
;listen.group = www-data
|
||||
;listen.mode = 0660
|
||||
; When POSIX Access Control Lists are supported you can set them using
|
||||
; these options, value is a comma separated list of user/group names.
|
||||
; When set, listen.owner and listen.group are ignored
|
||||
;listen.acl_users =
|
||||
;listen.acl_groups =
|
||||
|
||||
; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
|
||||
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
|
||||
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
|
||||
; must be separated by a comma. If this value is left blank, connections will be
|
||||
; accepted from any ip address.
|
||||
; Default Value: any
|
||||
;listen.allowed_clients = 0.0.0.0
|
||||
|
||||
; Specify the nice(2) priority to apply to the pool processes (only if set)
|
||||
; The value can vary from -19 (highest priority) to 20 (lower priority)
|
||||
; Note: - It will only work if the FPM master process is launched as root
|
||||
; - The pool processes will inherit the master process priority
|
||||
; unless it specified otherwise
|
||||
; Default Value: no set
|
||||
; process.priority = -19
|
||||
|
||||
; Choose how the process manager will control the number of child processes.
|
||||
; Possible Values:
|
||||
; static - a fixed number (pm.max_children) of child processes;
|
||||
; dynamic - the number of child processes are set dynamically based on the
|
||||
; following directives. With this process management, there will be
|
||||
; always at least 1 children.
|
||||
; pm.max_children - the maximum number of children that can
|
||||
; be alive at the same time.
|
||||
; pm.start_servers - the number of children created on startup.
|
||||
; pm.min_spare_servers - the minimum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is less than this
|
||||
; number then some children will be created.
|
||||
; pm.max_spare_servers - the maximum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is greater than this
|
||||
; number then some children will be killed.
|
||||
; ondemand - no children are created at startup. Children will be forked when
|
||||
; new requests will connect. The following parameter are used:
|
||||
; pm.max_children - the maximum number of children that
|
||||
; can be alive at the same time.
|
||||
; pm.process_idle_timeout - The number of seconds after which
|
||||
; an idle process will be killed.
|
||||
; Note: This value is mandatory.
|
||||
pm = dynamic
|
||||
|
||||
; The number of child processes to be created when pm is set to 'static' and the
|
||||
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
|
||||
; This value sets the limit on the number of simultaneous requests that will be
|
||||
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
|
||||
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
|
||||
; CGI. The below defaults are based on a server without much resources. Don't
|
||||
; forget to tweak pm.* to fit your needs.
|
||||
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
|
||||
; Note: This value is mandatory.
|
||||
pm.max_children = 8
|
||||
|
||||
; The number of child processes created on startup.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
|
||||
pm.start_servers = 2
|
||||
|
||||
; The desired minimum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.min_spare_servers = 1
|
||||
|
||||
; The desired maximum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.max_spare_servers = 3
|
||||
|
||||
; The number of seconds after which an idle process will be killed.
|
||||
; Note: Used only when pm is set to 'ondemand'
|
||||
; Default Value: 10s
|
||||
;pm.process_idle_timeout = 10s;
|
||||
|
||||
; The number of requests each child process should execute before respawning.
|
||||
; This can be useful to work around memory leaks in 3rd party libraries. For
|
||||
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
||||
; Default Value: 0
|
||||
;pm.max_requests = 500
|
||||
|
||||
; The URI to view the FPM status page. If this value is not set, no URI will be
|
||||
; recognized as a status page. It shows the following informations:
|
||||
; pool - the name of the pool;
|
||||
; process manager - static, dynamic or ondemand;
|
||||
; start time - the date and time FPM has started;
|
||||
; start since - number of seconds since FPM has started;
|
||||
; accepted conn - the number of request accepted by the pool;
|
||||
; listen queue - the number of request in the queue of pending
|
||||
; connections (see backlog in listen(2));
|
||||
; max listen queue - the maximum number of requests in the queue
|
||||
; of pending connections since FPM has started;
|
||||
; listen queue len - the size of the socket queue of pending connections;
|
||||
; idle processes - the number of idle processes;
|
||||
; active processes - the number of active processes;
|
||||
; total processes - the number of idle + active processes;
|
||||
; max active processes - the maximum number of active processes since FPM
|
||||
; has started;
|
||||
; max children reached - number of times, the process limit has been reached,
|
||||
; when pm tries to start more children (works only for
|
||||
; pm 'dynamic' and 'ondemand');
|
||||
; Value are updated in real time.
|
||||
; Example output:
|
||||
; pool: www
|
||||
; process manager: static
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 62636
|
||||
; accepted conn: 190460
|
||||
; listen queue: 0
|
||||
; max listen queue: 1
|
||||
; listen queue len: 42
|
||||
; idle processes: 4
|
||||
; active processes: 11
|
||||
; total processes: 15
|
||||
; max active processes: 12
|
||||
; max children reached: 0
|
||||
;
|
||||
; By default the status page output is formatted as text/plain. Passing either
|
||||
; 'html', 'xml' or 'json' in the query string will return the corresponding
|
||||
; output syntax. Example:
|
||||
; http://www.foo.bar/status
|
||||
; http://www.foo.bar/status?json
|
||||
; http://www.foo.bar/status?html
|
||||
; http://www.foo.bar/status?xml
|
||||
;
|
||||
; By default the status page only outputs short status. Passing 'full' in the
|
||||
; query string will also return status for each pool process.
|
||||
; Example:
|
||||
; http://www.foo.bar/status?full
|
||||
; http://www.foo.bar/status?json&full
|
||||
; http://www.foo.bar/status?html&full
|
||||
; http://www.foo.bar/status?xml&full
|
||||
; The Full status returns for each process:
|
||||
; pid - the PID of the process;
|
||||
; state - the state of the process (Idle, Running, ...);
|
||||
; start time - the date and time the process has started;
|
||||
; start since - the number of seconds since the process has started;
|
||||
; requests - the number of requests the process has served;
|
||||
; request duration - the duration in µs of the requests;
|
||||
; request method - the request method (GET, POST, ...);
|
||||
; request URI - the request URI with the query string;
|
||||
; content length - the content length of the request (only with POST);
|
||||
; user - the user (PHP_AUTH_USER) (or '-' if not set);
|
||||
; script - the main script called (or '-' if not set);
|
||||
; last request cpu - the %cpu the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because CPU calculation is done when the request
|
||||
; processing has terminated;
|
||||
; last request memory - the max amount of memory the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because memory calculation is done when the request
|
||||
; processing has terminated;
|
||||
; If the process is in Idle state, then informations are related to the
|
||||
; last request the process has served. Otherwise informations are related to
|
||||
; the current request being served.
|
||||
; Example output:
|
||||
; ************************
|
||||
; pid: 31330
|
||||
; state: Running
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 63087
|
||||
; requests: 12808
|
||||
; request duration: 1250261
|
||||
; request method: GET
|
||||
; request URI: /test_mem.php?N=10000
|
||||
; content length: 0
|
||||
; user: -
|
||||
; script: /home/fat/web/docs/php/test_mem.php
|
||||
; last request cpu: 0.00
|
||||
; last request memory: 0
|
||||
;
|
||||
; Note: There is a real-time FPM status monitoring sample web page available
|
||||
; It's available in: /usr/share/php5/fpm/status.html
|
||||
;
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
pm.status_path = /php-fpm-status
|
||||
|
||||
; The ping URI to call the monitoring page of FPM. If this value is not set, no
|
||||
; URI will be recognized as a ping page. This could be used to test from outside
|
||||
; that FPM is alive and responding, or to
|
||||
; - create a graph of FPM availability (rrd or such);
|
||||
; - remove a server from a group if it is not responding (load balancing);
|
||||
; - trigger alerts for the operating team (24/7).
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
ping.path = /php-fpm-ping
|
||||
|
||||
; This directive may be used to customize the response of a ping request. The
|
||||
; response is formatted as text/plain with a 200 response code.
|
||||
; Default Value: pong
|
||||
;ping.response = pong
|
||||
|
||||
; The access log file
|
||||
; Default: not set
|
||||
;access.log = log/$pool.access.log
|
||||
|
||||
; The access log format.
|
||||
; The following syntax is allowed
|
||||
; %%: the '%' character
|
||||
; %C: %CPU used by the request
|
||||
; it can accept the following format:
|
||||
; - %{user}C for user CPU only
|
||||
; - %{system}C for system CPU only
|
||||
; - %{total}C for user + system CPU (default)
|
||||
; %d: time taken to serve the request
|
||||
; it can accept the following format:
|
||||
; - %{seconds}d (default)
|
||||
; - %{miliseconds}d
|
||||
; - %{mili}d
|
||||
; - %{microseconds}d
|
||||
; - %{micro}d
|
||||
; %e: an environment variable (same as $_ENV or $_SERVER)
|
||||
; it must be associated with embraces to specify the name of the env
|
||||
; variable. Some exemples:
|
||||
; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
|
||||
; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
|
||||
; %f: script filename
|
||||
; %l: content-length of the request (for POST request only)
|
||||
; %m: request method
|
||||
; %M: peak of memory allocated by PHP
|
||||
; it can accept the following format:
|
||||
; - %{bytes}M (default)
|
||||
; - %{kilobytes}M
|
||||
; - %{kilo}M
|
||||
; - %{megabytes}M
|
||||
; - %{mega}M
|
||||
; %n: pool name
|
||||
; %o: output header
|
||||
; it must be associated with embraces to specify the name of the header:
|
||||
; - %{Content-Type}o
|
||||
; - %{X-Powered-By}o
|
||||
; - %{Transfert-Encoding}o
|
||||
; - ....
|
||||
; %p: PID of the child that serviced the request
|
||||
; %P: PID of the parent of the child that serviced the request
|
||||
; %q: the query string
|
||||
; %Q: the '?' character if query string exists
|
||||
; %r: the request URI (without the query string, see %q and %Q)
|
||||
; %R: remote IP address
|
||||
; %s: status (response code)
|
||||
; %t: server time the request was received
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; %T: time the log has been written (the request has finished)
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; %u: remote user
|
||||
;
|
||||
; Default: "%R - %u %t \"%m %r\" %s"
|
||||
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
|
||||
|
||||
; The log file for slow requests
|
||||
; Default Value: not set
|
||||
; Note: slowlog is mandatory if request_slowlog_timeout is set
|
||||
;slowlog = log/$pool.log.slow
|
||||
|
||||
; The timeout for serving a single request after which a PHP backtrace will be
|
||||
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_slowlog_timeout = 0
|
||||
|
||||
; The timeout for serving a single request after which the worker process will
|
||||
; be killed. This option should be used when the 'max_execution_time' ini option
|
||||
; does not stop script execution for some reason. A value of '0' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_terminate_timeout = 5m
|
||||
|
||||
; Set open file descriptor rlimit.
|
||||
; Default Value: system defined value
|
||||
;rlimit_files = 1024
|
||||
|
||||
; Set max core size rlimit.
|
||||
; Possible Values: 'unlimited' or an integer greater or equal to 0
|
||||
; Default Value: system defined value
|
||||
;rlimit_core = 0
|
||||
|
||||
; Chroot to this directory at the start. This value must be defined as an
|
||||
; absolute path. When this value is not set, chroot is not used.
|
||||
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
|
||||
; of its subdirectories. If the pool prefix is not set, the global prefix
|
||||
; will be used instead.
|
||||
; Note: chrooting is a great security feature and should be used whenever
|
||||
; possible. However, all PHP paths will be relative to the chroot
|
||||
; (error_log, sessions.save_path, ...).
|
||||
; Default Value: not set
|
||||
;chroot =
|
||||
|
||||
; Chdir to this directory at the start.
|
||||
; Note: relative path can be used.
|
||||
; Default Value: current directory or / when chroot
|
||||
chdir = /
|
||||
|
||||
; Redirect worker stdout and stderr into main error log. If not set, stdout and
|
||||
; stderr will be redirected to /dev/null according to FastCGI specs.
|
||||
; Note: on highloaded environement, this can cause some delay in the page
|
||||
; process time (several ms).
|
||||
; Default Value: no
|
||||
catch_workers_output = yes
|
||||
|
||||
; Clear environment in FPM workers
|
||||
; Prevents arbitrary environment variables from reaching FPM worker processes
|
||||
; by clearing the environment in workers before env vars specified in this
|
||||
; pool configuration are added.
|
||||
; Setting to "no" will make all environment variables available to PHP code
|
||||
; via getenv(), $_ENV and $_SERVER.
|
||||
; Default Value: yes
|
||||
;clear_env = no
|
||||
|
||||
; Limits the extensions of the main script FPM will allow to parse. This can
|
||||
; prevent configuration mistakes on the web server side. You should only limit
|
||||
; FPM to .php extensions to prevent malicious users to use other extensions to
|
||||
; exectute php code.
|
||||
; Note: set an empty value to allow all extensions.
|
||||
; Default Value: .php
|
||||
;security.limit_extensions = .php .php3 .php4 .php5
|
||||
|
||||
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
|
||||
; the current environment.
|
||||
; Default Value: clean env
|
||||
;env[HOSTNAME] = $HOSTNAME
|
||||
;env[PATH] = /usr/local/bin:/usr/bin:/bin
|
||||
;env[TMP] = /tmp
|
||||
;env[TMPDIR] = /tmp
|
||||
;env[TEMP] = /tmp
|
||||
|
||||
; Additional php.ini defines, specific to this pool of workers. These settings
|
||||
; overwrite the values previously defined in the php.ini. The directives are the
|
||||
; same as the PHP SAPI:
|
||||
; php_value/php_flag - you can set classic ini defines which can
|
||||
; be overwritten from PHP call 'ini_set'.
|
||||
; php_admin_value/php_admin_flag - these directives won't be overwritten by
|
||||
; PHP call 'ini_set'
|
||||
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
|
||||
|
||||
; Defining 'extension' will load the corresponding shared extension from
|
||||
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
|
||||
; overwrite previously defined php.ini values, but will append the new value
|
||||
; instead.
|
||||
|
||||
; Note: path INI options can be relative and will be expanded with the prefix
|
||||
; (pool, global or /usr)
|
||||
|
||||
; Default Value: nothing is defined by default except the values in php.ini and
|
||||
; specified at startup with the -d argument
|
||||
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
|
||||
;php_flag[display_errors] = off
|
||||
;php_admin_value[error_log] = /var/log/fpm-php.www.log
|
||||
;php_admin_flag[log_errors] = on
|
||||
;php_admin_value[memory_limit] = 32M
|
||||
@@ -1,56 +0,0 @@
|
||||
[PHP]
|
||||
expose_php = Off
|
||||
disable_functions = exec,system,popen,passthru,apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,virtual,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority
|
||||
enable_dl = Off
|
||||
allow_url_fopen = On
|
||||
allow_url_include = Off
|
||||
engine = On
|
||||
short_open_tag = On
|
||||
output_buffering = 4096
|
||||
realpath_cache_size = 4096k
|
||||
realpath_cache_ttl = 600
|
||||
include_path = .:/usr/share/php
|
||||
date.timezone = Europe/Paris
|
||||
default_socket_timeout = 10
|
||||
max_execution_time = 30
|
||||
max_input_time = 60
|
||||
max_input_vars = 1000
|
||||
memory_limit = 512M
|
||||
post_max_size = 32M
|
||||
file_uploads = On
|
||||
upload_tmp_dir = /tmp
|
||||
upload_max_filesize = 32M
|
||||
max_file_uploads = 20
|
||||
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
|
||||
display_errors = Off
|
||||
display_startup_errors = Off
|
||||
log_errors = On
|
||||
html_errors = On
|
||||
SMTP = mailcatcher
|
||||
smtp_port = 1025
|
||||
sendmail_path = /usr/sbin/sendmail -t -i
|
||||
mail_log = syslog
|
||||
session.save_handler = memcached
|
||||
session.save_path = memcached:11211
|
||||
session.use_cookies = 1
|
||||
session.cookie_secure =
|
||||
session.use_only_cookies = 1
|
||||
session.name = PHPSESSID
|
||||
session.auto_start = 0
|
||||
session.cookie_lifetime = 0
|
||||
session.cookie_path = /
|
||||
session.cookie_domain =
|
||||
session.cookie_httponly =
|
||||
session.serialize_handler = php
|
||||
session.gc_probability = 0
|
||||
session.gc_divisor = 1000
|
||||
session.gc_maxlifetime = 2592000
|
||||
session.bug_compat_42 = Off
|
||||
session.bug_compat_warn = Off
|
||||
session.referer_check =
|
||||
session.entropy_length = 512
|
||||
session.entropy_file = /dev/urandom
|
||||
session.cache_limiter = nocache
|
||||
session.cache_expire = 180
|
||||
session.use_trans_sid = 0
|
||||
session.hash_function = 0
|
||||
@@ -1 +0,0 @@
|
||||
suhosin.executor.disable_eval = On
|
||||
@@ -1,13 +0,0 @@
|
||||
xdebug.collect_params = 1
|
||||
xdebug.collect_return = 1
|
||||
xdebug.default_enable = 1
|
||||
xdebug.force_display_errors = 1
|
||||
xdebug.force_error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
|
||||
xdebug.halt_level = E_WARNING
|
||||
xdebug.idekey = PHPSTORM
|
||||
xdebug.max_nesting_level = 1024
|
||||
xdebug.remote_enable = 1
|
||||
xdebug.remote_connect_back = 1
|
||||
xdebug.scream = 0
|
||||
xdebug.show_error_trace = 1
|
||||
xdebug.show_exception_trace = 1
|
||||
@@ -1,270 +0,0 @@
|
||||
FROM php:7.0-fpm-alpine as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG AMQP_VERSION=stable
|
||||
ARG AST_VERSION=stable
|
||||
ARG APCU_VERSION=stable
|
||||
ARG BLACKFIRE_VERSION=1.34.3
|
||||
ARG CACHETOOL_VERSION=4.0.1
|
||||
ARG DS_VERSION=stable
|
||||
ARG EVENT_VERSION=stable
|
||||
ARG IGBINARY_VERSION=stable
|
||||
ARG IMAGICK_VERSION=stable
|
||||
ARG GEOIP_VERSION=beta
|
||||
ARG GRPC_VERSION=stable
|
||||
ARG MCRYPT_VERSION=stable
|
||||
ARG MEMCACHE_VERSION=4.0.1-php73
|
||||
ARG MEMCACHED_VERSION=stable
|
||||
ARG MONGODB_VERSION=1.6.1
|
||||
ARG NEWRELIC_VERSION=9.11.0.267
|
||||
ARG OAUTH_VERSION=stable
|
||||
ARG RAR_VERSION=stable
|
||||
ARG REDIS_VERSION=stable
|
||||
ARG SNUFFLEUPAGUS_VERSION=0.5.1
|
||||
ARG UUID_VERSION=stable
|
||||
ARG XDEBUG_VERSION=2.7.2
|
||||
ARG XHPROF_VERSION=2.2.0
|
||||
ARG YAML_VERSION=stable
|
||||
|
||||
RUN apk --no-cache upgrade \
|
||||
&& apk add --no-cache --virtual .build-deps \
|
||||
$PHPIZE_DEPS \
|
||||
aspell-dev \
|
||||
bison \
|
||||
bzip2-dev \
|
||||
curl-dev \
|
||||
enchant-dev \
|
||||
flex \
|
||||
freetype-dev \
|
||||
gawk \
|
||||
geoip-dev \
|
||||
gettext-dev \
|
||||
gmp-dev \
|
||||
icu-dev \
|
||||
imagemagick-dev \
|
||||
imap-dev \
|
||||
libevent-dev \
|
||||
libjpeg-turbo-dev \
|
||||
libmcrypt-dev \
|
||||
libmemcached-dev \
|
||||
libpng-dev \
|
||||
libressl-dev \
|
||||
libxml2-dev \
|
||||
libxslt-dev \
|
||||
linux-headers \
|
||||
make \
|
||||
net-snmp-dev \
|
||||
openldap-dev \
|
||||
postgresql-dev \
|
||||
pcre-dev \
|
||||
rabbitmq-c-dev \
|
||||
tidyhtml-dev \
|
||||
yaml-dev \
|
||||
zlib-dev \
|
||||
# blackfire \
|
||||
&& wget https://packages.blackfire.io/binaries/blackfire-php/${BLACKFIRE_VERSION}/blackfire-php-alpine_amd64-php-$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;").so -O $(php -r "echo ini_get('extension_dir');")/blackfire.so \
|
||||
# gd \
|
||||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ \
|
||||
# memcache \
|
||||
&& wget https://github.com/websupport-sk/pecl-memcache/archive/v${MEMCACHE_VERSION}.tar.gz -O /tmp/memcache-${MEMCACHE_VERSION}.tar.gz \
|
||||
&& mkdir -p /tmp/memcache-${MEMCACHE_VERSION} \
|
||||
&& tar xzf /tmp/memcache-${MEMCACHE_VERSION}.tar.gz -C /tmp/memcache-${MEMCACHE_VERSION} --strip-components=1 \
|
||||
# https://github.com/websupport-sk/pecl-memcache/pull/39 \
|
||||
&& sed -i '399s/);/, char *);/' /tmp/memcache-${MEMCACHE_VERSION}/php7/memcache_pool.h \
|
||||
# https://github.com/websupport-sk/pecl-memcache/pull/40 \
|
||||
&& sed -i '47i#if PHP_VERSION_ID < 70200\n register size_t newlen;\n#endif' /tmp/memcache-${MEMCACHE_VERSION}/php7/memcache_pool.c \
|
||||
# newrelic \
|
||||
&& wget https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz -O /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz \
|
||||
&& mkdir -p /tmp/newrelic-${NEWRELIC_VERSION} \
|
||||
&& tar xzf /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz -C /tmp/newrelic-${NEWRELIC_VERSION} --strip-components=1 \
|
||||
&& rm /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz \
|
||||
&& mv /tmp/newrelic-${NEWRELIC_VERSION}/agent/x64/newrelic-20151012.so $(php -r "echo ini_get('extension_dir');")/newrelic.so \
|
||||
# snuffleupagus \
|
||||
&& wget https://github.com/jvoisin/snuffleupagus/archive/v${SNUFFLEUPAGUS_VERSION}.tar.gz -O /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}.tar.gz \
|
||||
&& mkdir -p /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION} \
|
||||
&& tar xzf /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}.tar.gz -C /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION} --strip-components=1 \
|
||||
&& docker-php-ext-configure /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}/src --prefix=/usr --enable-snuffleupagus \
|
||||
# xhprof \
|
||||
&& wget https://github.com/longxinH/xhprof/archive/v${XHPROF_VERSION}.tar.gz -O /tmp/xhprof-${XHPROF_VERSION}.tar.gz \
|
||||
&& mkdir -p /tmp/xhprof-${XHPROF_VERSION} \
|
||||
&& tar xzf /tmp/xhprof-${XHPROF_VERSION}.tar.gz -C /tmp/xhprof-${XHPROF_VERSION} --strip-components=1 \
|
||||
&& docker-php-ext-configure /tmp/xhprof-${XHPROF_VERSION}/extension --with-php-config=/usr/local/bin/php-config \
|
||||
# tidy \
|
||||
&& docker-php-source extract \
|
||||
&& cd /usr/src/php \
|
||||
&& sed -i 's/buffio.h/tidybuffio.h/' ext/tidy/*.c \
|
||||
&& docker-php-ext-install -j$(nproc) \
|
||||
bcmath \
|
||||
bz2 \
|
||||
calendar \
|
||||
dba \
|
||||
enchant \
|
||||
exif \
|
||||
gd \
|
||||
gettext \
|
||||
gmp \
|
||||
imap \
|
||||
intl \
|
||||
ldap \
|
||||
mcrypt \
|
||||
/tmp/memcache-${MEMCACHE_VERSION} \
|
||||
mysqli \
|
||||
opcache \
|
||||
pcntl \
|
||||
pdo_mysql \
|
||||
pdo_pgsql \
|
||||
pgsql \
|
||||
pspell \
|
||||
shmop \
|
||||
snmp \
|
||||
soap \
|
||||
sockets \
|
||||
sysvmsg \
|
||||
sysvsem \
|
||||
sysvshm \
|
||||
tidy \
|
||||
/tmp/xhprof-${XHPROF_VERSION}/extension \
|
||||
xmlrpc \
|
||||
xsl \
|
||||
zip \
|
||||
# docker-php-ext-install fails after snuffleupagus is enabled
|
||||
/tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}/src \
|
||||
&& docker-php-source delete \
|
||||
&& rm /usr/local/etc/php/conf.d/docker-php-ext-* \
|
||||
&& rm -rf /tmp/memcache-* \
|
||||
&& rm -rf /tmp/newrelic-* \
|
||||
&& rm -rf /tmp/snuffleupagus-* \
|
||||
&& rm -rf /tmp/xhprof-* \
|
||||
&& pecl install amqp-${AMQP_VERSION} \
|
||||
&& pecl install apcu-${APCU_VERSION} \
|
||||
&& pecl install ast-${AST_VERSION} \
|
||||
&& pecl install ds-${DS_VERSION} \
|
||||
&& pecl install event-${EVENT_VERSION} \
|
||||
&& pecl install geoip-${GEOIP_VERSION} \
|
||||
&& pecl install grpc-${GRPC_VERSION} \
|
||||
&& pecl install igbinary-${IGBINARY_VERSION} \
|
||||
&& pecl install imagick-${IMAGICK_VERSION} \
|
||||
&& pecl install memcached-${MEMCACHED_VERSION} \
|
||||
&& pecl install mongodb-${MONGODB_VERSION} \
|
||||
&& pecl install oauth-${OAUTH_VERSION} \
|
||||
&& pecl install rar-${RAR_VERSION} \
|
||||
&& pecl install redis-${REDIS_VERSION} \
|
||||
&& echo |pecl install uuid-${UUID_VERSION} \
|
||||
&& pecl install xdebug-${XDEBUG_VERSION} \
|
||||
&& pecl install yaml-${YAML_VERSION} \
|
||||
&& pecl clear-cache \
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner --recursive /usr/local \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
| xargs -r apk info --installed \
|
||||
| sort -u \
|
||||
)" \
|
||||
&& apk del .build-deps \
|
||||
&& apk add --no-cache --virtual .run-deps $runDeps
|
||||
|
||||
RUN wget http://gordalina.github.io/cachetool/downloads/cachetool-${CACHETOOL_VERSION}.phar -O /usr/local/bin/cachetool \
|
||||
&& chmod +x /usr/local/bin/cachetool \
|
||||
&& echo -e "\
|
||||
adapter: fastcgi \n\
|
||||
fastcgi: 127.0.0.1:9000 \n\
|
||||
" > /etc/cachetool.yml
|
||||
|
||||
RUN mkdir -p /etc/ssh && echo -e "\
|
||||
Host * \n\
|
||||
Compression yes \n\
|
||||
" >> /etc/ssh/ssh_config
|
||||
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
bzip2 \
|
||||
coreutils \
|
||||
gettext \
|
||||
git \
|
||||
imagemagick \
|
||||
lftp \
|
||||
mailx \
|
||||
make \
|
||||
mysql-client \
|
||||
nano \
|
||||
openssh-client \
|
||||
ssmtp \
|
||||
vim
|
||||
|
||||
# Iconv fix: https://github.com/docker-library/php/issues/240#issuecomment-305038173
|
||||
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ gnu-libiconv
|
||||
ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so
|
||||
|
||||
# builtin modules : Core ctype curl date dom fileinfo filter ftp hash iconv json libxml mbstring mysqlnd openssl pcre PDO pdo_sqlite Phar posix readline Reflection session SimpleXML SPL sqlite3 standard tokenizer xml xmlreader xmlwriter zlib
|
||||
# available modules : amqp apcu ast bcmath blackfire bz2 calendar dba ds enchant event exif gd geoip gmp grpc igbinary imap imagick intl ldap mcrypt memcache memcached mongodb mysqli newrelic oauth opcache pcntl pdo_mysql pdo_pgsql pgsql pspell rar redis shmop snmp snuffleupagus soap sockets sysvmsg sysvsem sysvshm xhprof tidy uuid wddx xdebug xhprof xmlrpc xsl yaml zip
|
||||
ARG PHP_EXT_ENABLE="amqp apcu bcmath bz2 calendar gd geoip imagick intl mcrypt memcached mysqli oauth opcache pdo_mysql redis soap sockets uuid yaml zip"
|
||||
RUN docker-php-ext-enable ${PHP_EXT_ENABLE}
|
||||
|
||||
# copy *.ini
|
||||
COPY ${DOCKER_BUILD_DIR}/*.ini /usr/local/etc/php/conf.d/
|
||||
COPY ${DOCKER_BUILD_DIR}/php-fpm-*.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
# custom php config
|
||||
ARG PHP_INI_CONFIG
|
||||
RUN echo -e ${PHP_INI_CONFIG// /\\n} >> /usr/local/etc/php/conf.d/config.ini
|
||||
|
||||
# custom php cli
|
||||
ARG PHP_CLI_CONFIG="apc.enable_cli=0 max_execution_time=-1 memory_limit=-1 opcache.enable_cli=0 xdebug.default_enable=0"
|
||||
RUN echo '#!/usr/bin/env sh' > /usr/local/bin/php-cli \
|
||||
&& chmod +x /usr/local/bin/php-cli \
|
||||
&& echo -e "\
|
||||
/usr/local/bin/php -d ${PHP_CLI_CONFIG// / -d } \"\$@\"\
|
||||
" >> /usr/local/bin/php-cli
|
||||
|
||||
# install cronlock
|
||||
ADD https://raw.github.com/kvz/cronlock/master/cronlock /usr/bin/cronlock
|
||||
RUN chmod +rx /usr/bin/cronlock
|
||||
|
||||
# config ssmtp
|
||||
RUN echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf
|
||||
|
||||
# https://bugs.php.net/bug.php?id=71880
|
||||
ENV LOG_STREAM="/tmp/stdout"
|
||||
RUN mkfifo $LOG_STREAM && chmod 777 $LOG_STREAM
|
||||
|
||||
# default www-data homedir to /var/www for crontabs
|
||||
RUN sed -i 's|/home/www-data|/var/www|' /etc/passwd
|
||||
WORKDIR /var/www
|
||||
|
||||
# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env
|
||||
CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ]
|
||||
|
||||
FROM dist as master
|
||||
ARG UID
|
||||
ARG USER
|
||||
ENV UID=${UID}
|
||||
ENV GID=${UID}
|
||||
ENV USER=${USER}
|
||||
|
||||
# If we provide a specific UID
|
||||
RUN let $UID >/dev/null 2>&1 \
|
||||
# Remove user with $UID if it is not our $USER
|
||||
&& if [ "$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')" != "$USER" ]; then \
|
||||
sed -i '/^'$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')':x:'$UID':/d' /etc/passwd; \
|
||||
sed -i '/^'$(getent group $GID |awk 'BEGIN {FS=":"} {print $1}')':x:'$GID':/d' /etc/group; \
|
||||
fi \
|
||||
# Force $UID if our $USER already exists
|
||||
&& sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \
|
||||
&& sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \
|
||||
# Create $USER if it does not exist
|
||||
&& if [ "$(getent passwd $UID)" = "" ]; then \
|
||||
echo "$USER:x:$UID:$GID::/home/$USER:/bin/false" >> /etc/passwd; \
|
||||
echo "$USER:!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \
|
||||
echo "$USER:x:$GID:" >> /etc/group; \
|
||||
fi \
|
||||
&& mkdir -p /home/$USER \
|
||||
&& chown $UID:$GID /home/$USER \
|
||||
|| true
|
||||
|
||||
RUN chown -R $USER /usr/local/etc/php/conf.d/
|
||||
|
||||
USER $USER
|
||||
|
||||
ARG SSH_REMOTE_HOSTS
|
||||
|
||||
RUN mkdir -p ~/.ssh \
|
||||
&& ssh-keyscan -t rsa -H $SSH_REMOTE_HOSTS >> ~/.ssh/known_hosts
|
||||
@@ -1,5 +0,0 @@
|
||||
apc.enable_cli = 0
|
||||
apc.enabled = 1
|
||||
apc.shm_segments = 1
|
||||
apc.shm_size = 32M
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
blackfire.agent_socket=tcp://blackfire:8707
|
||||
@@ -1 +0,0 @@
|
||||
memcached.sess_locking = Off
|
||||
@@ -1,4 +0,0 @@
|
||||
[newrelic]
|
||||
newrelic.logfile = /dev/self/fd/2
|
||||
newrelic.daemon.logfile = /dev/self/fd/2
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
opcache.enable = 1
|
||||
opcache.enable_cli = 0
|
||||
opcache.error_log = /proc/self/fd/2
|
||||
opcache.interned_strings_buffer = 16
|
||||
opcache.log_verbosity_level = 2
|
||||
opcache.max_accelerated_files = 20000
|
||||
opcache.memory_consumption = 256
|
||||
opcache.validate_timestamps = 1
|
||||
@@ -1,412 +0,0 @@
|
||||
; Start a new pool named 'www'.
|
||||
; the variable $pool can we used in any directive and will be replaced by the
|
||||
; pool name ('www' here)
|
||||
[www]
|
||||
|
||||
; Per pool prefix
|
||||
; It only applies on the following directives:
|
||||
; - 'access.log'
|
||||
; - 'slowlog'
|
||||
; - 'listen' (unixsocket)
|
||||
; - 'chroot'
|
||||
; - 'chdir'
|
||||
; - 'php_values'
|
||||
; - 'php_admin_values'
|
||||
; When not set, the global prefix (or /usr) applies instead.
|
||||
; Note: This directive can also be relative to the global prefix.
|
||||
; Default Value: none
|
||||
;prefix = /path/to/pools/$pool
|
||||
|
||||
; Unix user/group of processes
|
||||
; Note: The user is mandatory. If the group is not set, the default user's group
|
||||
; will be used.
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
; The address on which to accept FastCGI requests.
|
||||
; Valid syntaxes are:
|
||||
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
|
||||
; a specific port;
|
||||
; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
|
||||
; a specific port;
|
||||
; 'port' - to listen on a TCP socket to all IPv4 addresses on a
|
||||
; specific port;
|
||||
; '[::]:port' - to listen on a TCP socket to all addresses
|
||||
; (IPv6 and IPv4-mapped) on a specific port;
|
||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
; Note: This value is mandatory.
|
||||
;listen = /var/run/php5-fpm.sock
|
||||
listen = 0.0.0.0:9000
|
||||
|
||||
; Set listen(2) backlog.
|
||||
; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
|
||||
listen.backlog = 1023
|
||||
|
||||
; Set permissions for unix socket, if one is used. In Linux, read/write
|
||||
; permissions must be set in order to allow connections from a web server. Many
|
||||
; BSD-derived systems allow connections regardless of permissions.
|
||||
; Default Values: user and group are set as the running user
|
||||
; mode is set to 0660
|
||||
;listen.owner = www-data
|
||||
;listen.group = www-data
|
||||
;listen.mode = 0660
|
||||
; When POSIX Access Control Lists are supported you can set them using
|
||||
; these options, value is a comma separated list of user/group names.
|
||||
; When set, listen.owner and listen.group are ignored
|
||||
;listen.acl_users =
|
||||
;listen.acl_groups =
|
||||
|
||||
; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
|
||||
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
|
||||
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
|
||||
; must be separated by a comma. If this value is left blank, connections will be
|
||||
; accepted from any ip address.
|
||||
; Default Value: any
|
||||
;listen.allowed_clients = 0.0.0.0
|
||||
|
||||
; Specify the nice(2) priority to apply to the pool processes (only if set)
|
||||
; The value can vary from -19 (highest priority) to 20 (lower priority)
|
||||
; Note: - It will only work if the FPM master process is launched as root
|
||||
; - The pool processes will inherit the master process priority
|
||||
; unless it specified otherwise
|
||||
; Default Value: no set
|
||||
; process.priority = -19
|
||||
|
||||
; Choose how the process manager will control the number of child processes.
|
||||
; Possible Values:
|
||||
; static - a fixed number (pm.max_children) of child processes;
|
||||
; dynamic - the number of child processes are set dynamically based on the
|
||||
; following directives. With this process management, there will be
|
||||
; always at least 1 children.
|
||||
; pm.max_children - the maximum number of children that can
|
||||
; be alive at the same time.
|
||||
; pm.start_servers - the number of children created on startup.
|
||||
; pm.min_spare_servers - the minimum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is less than this
|
||||
; number then some children will be created.
|
||||
; pm.max_spare_servers - the maximum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is greater than this
|
||||
; number then some children will be killed.
|
||||
; ondemand - no children are created at startup. Children will be forked when
|
||||
; new requests will connect. The following parameter are used:
|
||||
; pm.max_children - the maximum number of children that
|
||||
; can be alive at the same time.
|
||||
; pm.process_idle_timeout - The number of seconds after which
|
||||
; an idle process will be killed.
|
||||
; Note: This value is mandatory.
|
||||
pm = dynamic
|
||||
|
||||
; The number of child processes to be created when pm is set to 'static' and the
|
||||
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
|
||||
; This value sets the limit on the number of simultaneous requests that will be
|
||||
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
|
||||
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
|
||||
; CGI. The below defaults are based on a server without much resources. Don't
|
||||
; forget to tweak pm.* to fit your needs.
|
||||
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
|
||||
; Note: This value is mandatory.
|
||||
pm.max_children = 16
|
||||
|
||||
; The number of child processes created on startup.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
|
||||
pm.start_servers = 2
|
||||
|
||||
; The desired minimum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.min_spare_servers = 1
|
||||
|
||||
; The desired maximum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.max_spare_servers = 3
|
||||
|
||||
; The number of seconds after which an idle process will be killed.
|
||||
; Note: Used only when pm is set to 'ondemand'
|
||||
; Default Value: 10s
|
||||
;pm.process_idle_timeout = 10s;
|
||||
|
||||
; The number of requests each child process should execute before respawning.
|
||||
; This can be useful to work around memory leaks in 3rd party libraries. For
|
||||
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
||||
; Default Value: 0
|
||||
;pm.max_requests = 500
|
||||
|
||||
; The URI to view the FPM status page. If this value is not set, no URI will be
|
||||
; recognized as a status page. It shows the following informations:
|
||||
; pool - the name of the pool;
|
||||
; process manager - static, dynamic or ondemand;
|
||||
; start time - the date and time FPM has started;
|
||||
; start since - number of seconds since FPM has started;
|
||||
; accepted conn - the number of request accepted by the pool;
|
||||
; listen queue - the number of request in the queue of pending
|
||||
; connections (see backlog in listen(2));
|
||||
; max listen queue - the maximum number of requests in the queue
|
||||
; of pending connections since FPM has started;
|
||||
; listen queue len - the size of the socket queue of pending connections;
|
||||
; idle processes - the number of idle processes;
|
||||
; active processes - the number of active processes;
|
||||
; total processes - the number of idle + active processes;
|
||||
; max active processes - the maximum number of active processes since FPM
|
||||
; has started;
|
||||
; max children reached - number of times, the process limit has been reached,
|
||||
; when pm tries to start more children (works only for
|
||||
; pm 'dynamic' and 'ondemand');
|
||||
; Value are updated in real time.
|
||||
; Example output:
|
||||
; pool: www
|
||||
; process manager: static
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 62636
|
||||
; accepted conn: 190460
|
||||
; listen queue: 0
|
||||
; max listen queue: 1
|
||||
; listen queue len: 42
|
||||
; idle processes: 4
|
||||
; active processes: 11
|
||||
; total processes: 15
|
||||
; max active processes: 12
|
||||
; max children reached: 0
|
||||
;
|
||||
; By default the status page output is formatted as text/plain. Passing either
|
||||
; 'html', 'xml' or 'json' in the query string will return the corresponding
|
||||
; output syntax. Example:
|
||||
; http://www.foo.bar/status
|
||||
; http://www.foo.bar/status?json
|
||||
; http://www.foo.bar/status?html
|
||||
; http://www.foo.bar/status?xml
|
||||
;
|
||||
; By default the status page only outputs short status. Passing 'full' in the
|
||||
; query string will also return status for each pool process.
|
||||
; Example:
|
||||
; http://www.foo.bar/status?full
|
||||
; http://www.foo.bar/status?json&full
|
||||
; http://www.foo.bar/status?html&full
|
||||
; http://www.foo.bar/status?xml&full
|
||||
; The Full status returns for each process:
|
||||
; pid - the PID of the process;
|
||||
; state - the state of the process (Idle, Running, ...);
|
||||
; start time - the date and time the process has started;
|
||||
; start since - the number of seconds since the process has started;
|
||||
; requests - the number of requests the process has served;
|
||||
; request duration - the duration in µs of the requests;
|
||||
; request method - the request method (GET, POST, ...);
|
||||
; request URI - the request URI with the query string;
|
||||
; content length - the content length of the request (only with POST);
|
||||
; user - the user (PHP_AUTH_USER) (or '-' if not set);
|
||||
; script - the main script called (or '-' if not set);
|
||||
; last request cpu - the %cpu the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because CPU calculation is done when the request
|
||||
; processing has terminated;
|
||||
; last request memory - the max amount of memory the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because memory calculation is done when the request
|
||||
; processing has terminated;
|
||||
; If the process is in Idle state, then informations are related to the
|
||||
; last request the process has served. Otherwise informations are related to
|
||||
; the current request being served.
|
||||
; Example output:
|
||||
; ************************
|
||||
; pid: 31330
|
||||
; state: Running
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 63087
|
||||
; requests: 12808
|
||||
; request duration: 1250261
|
||||
; request method: GET
|
||||
; request URI: /test_mem.php?N=10000
|
||||
; content length: 0
|
||||
; user: -
|
||||
; script: /home/fat/web/docs/php/test_mem.php
|
||||
; last request cpu: 0.00
|
||||
; last request memory: 0
|
||||
;
|
||||
; Note: There is a real-time FPM status monitoring sample web page available
|
||||
; It's available in: /usr/share/php5/fpm/status.html
|
||||
;
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
pm.status_path = /php-fpm-status
|
||||
|
||||
; The ping URI to call the monitoring page of FPM. If this value is not set, no
|
||||
; URI will be recognized as a ping page. This could be used to test from outside
|
||||
; that FPM is alive and responding, or to
|
||||
; - create a graph of FPM availability (rrd or such);
|
||||
; - remove a server from a group if it is not responding (load balancing);
|
||||
; - trigger alerts for the operating team (24/7).
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
ping.path = /php-fpm-ping
|
||||
|
||||
; This directive may be used to customize the response of a ping request. The
|
||||
; response is formatted as text/plain with a 200 response code.
|
||||
; Default Value: pong
|
||||
;ping.response = pong
|
||||
|
||||
; The access log file
|
||||
; Default: not set
|
||||
;access.log = log/$pool.access.log
|
||||
|
||||
; The access log format.
|
||||
; The following syntax is allowed
|
||||
; %%: the '%' character
|
||||
; %C: %CPU used by the request
|
||||
; it can accept the following format:
|
||||
; - %{user}C for user CPU only
|
||||
; - %{system}C for system CPU only
|
||||
; - %{total}C for user + system CPU (default)
|
||||
; %d: time taken to serve the request
|
||||
; it can accept the following format:
|
||||
; - %{seconds}d (default)
|
||||
; - %{miliseconds}d
|
||||
; - %{mili}d
|
||||
; - %{microseconds}d
|
||||
; - %{micro}d
|
||||
; %e: an environment variable (same as $_ENV or $_SERVER)
|
||||
; it must be associated with embraces to specify the name of the env
|
||||
; variable. Some exemples:
|
||||
; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
|
||||
; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
|
||||
; %f: script filename
|
||||
; %l: content-length of the request (for POST request only)
|
||||
; %m: request method
|
||||
; %M: peak of memory allocated by PHP
|
||||
; it can accept the following format:
|
||||
; - %{bytes}M (default)
|
||||
; - %{kilobytes}M
|
||||
; - %{kilo}M
|
||||
; - %{megabytes}M
|
||||
; - %{mega}M
|
||||
; %n: pool name
|
||||
; %o: output header
|
||||
; it must be associated with embraces to specify the name of the header:
|
||||
; - %{Content-Type}o
|
||||
; - %{X-Powered-By}o
|
||||
; - %{Transfert-Encoding}o
|
||||
; - ....
|
||||
; %p: PID of the child that serviced the request
|
||||
; %P: PID of the parent of the child that serviced the request
|
||||
; %q: the query string
|
||||
; %Q: the '?' character if query string exists
|
||||
; %r: the request URI (without the query string, see %q and %Q)
|
||||
; %R: remote IP address
|
||||
; %s: status (response code)
|
||||
; %t: server time the request was received
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; %T: time the log has been written (the request has finished)
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; %u: remote user
|
||||
;
|
||||
; Default: "%R - %u %t \"%m %r\" %s"
|
||||
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
|
||||
|
||||
; The log file for slow requests
|
||||
; Default Value: not set
|
||||
; Note: slowlog is mandatory if request_slowlog_timeout is set
|
||||
;slowlog = log/$pool.log.slow
|
||||
|
||||
; The timeout for serving a single request after which a PHP backtrace will be
|
||||
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_slowlog_timeout = 0
|
||||
|
||||
; The timeout for serving a single request after which the worker process will
|
||||
; be killed. This option should be used when the 'max_execution_time' ini option
|
||||
; does not stop script execution for some reason. A value of '0' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_terminate_timeout = 5m
|
||||
|
||||
; Set open file descriptor rlimit.
|
||||
; Default Value: system defined value
|
||||
;rlimit_files = 1024
|
||||
|
||||
; Set max core size rlimit.
|
||||
; Possible Values: 'unlimited' or an integer greater or equal to 0
|
||||
; Default Value: system defined value
|
||||
;rlimit_core = 0
|
||||
|
||||
; Chroot to this directory at the start. This value must be defined as an
|
||||
; absolute path. When this value is not set, chroot is not used.
|
||||
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
|
||||
; of its subdirectories. If the pool prefix is not set, the global prefix
|
||||
; will be used instead.
|
||||
; Note: chrooting is a great security feature and should be used whenever
|
||||
; possible. However, all PHP paths will be relative to the chroot
|
||||
; (error_log, sessions.save_path, ...).
|
||||
; Default Value: not set
|
||||
;chroot =
|
||||
|
||||
; Chdir to this directory at the start.
|
||||
; Note: relative path can be used.
|
||||
; Default Value: current directory or / when chroot
|
||||
chdir = /
|
||||
|
||||
; Redirect worker stdout and stderr into main error log. If not set, stdout and
|
||||
; stderr will be redirected to /dev/null according to FastCGI specs.
|
||||
; Note: on highloaded environement, this can cause some delay in the page
|
||||
; process time (several ms).
|
||||
; Default Value: no
|
||||
catch_workers_output = yes
|
||||
|
||||
; Clear environment in FPM workers
|
||||
; Prevents arbitrary environment variables from reaching FPM worker processes
|
||||
; by clearing the environment in workers before env vars specified in this
|
||||
; pool configuration are added.
|
||||
; Setting to "no" will make all environment variables available to PHP code
|
||||
; via getenv(), $_ENV and $_SERVER.
|
||||
; Default Value: yes
|
||||
;clear_env = no
|
||||
|
||||
; Limits the extensions of the main script FPM will allow to parse. This can
|
||||
; prevent configuration mistakes on the web server side. You should only limit
|
||||
; FPM to .php extensions to prevent malicious users to use other extensions to
|
||||
; exectute php code.
|
||||
; Note: set an empty value to allow all extensions.
|
||||
; Default Value: .php
|
||||
;security.limit_extensions = .php .php3 .php4 .php5
|
||||
|
||||
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
|
||||
; the current environment.
|
||||
; Default Value: clean env
|
||||
;env[HOSTNAME] = $HOSTNAME
|
||||
;env[PATH] = /usr/local/bin:/usr/bin:/bin
|
||||
;env[TMP] = /tmp
|
||||
;env[TMPDIR] = /tmp
|
||||
;env[TEMP] = /tmp
|
||||
|
||||
; Additional php.ini defines, specific to this pool of workers. These settings
|
||||
; overwrite the values previously defined in the php.ini. The directives are the
|
||||
; same as the PHP SAPI:
|
||||
; php_value/php_flag - you can set classic ini defines which can
|
||||
; be overwritten from PHP call 'ini_set'.
|
||||
; php_admin_value/php_admin_flag - these directives won't be overwritten by
|
||||
; PHP call 'ini_set'
|
||||
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
|
||||
|
||||
; Defining 'extension' will load the corresponding shared extension from
|
||||
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
|
||||
; overwrite previously defined php.ini values, but will append the new value
|
||||
; instead.
|
||||
|
||||
; Note: path INI options can be relative and will be expanded with the prefix
|
||||
; (pool, global or /usr)
|
||||
|
||||
; Default Value: nothing is defined by default except the values in php.ini and
|
||||
; specified at startup with the -d argument
|
||||
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
|
||||
;php_flag[display_errors] = off
|
||||
;php_admin_value[error_log] = /var/log/fpm-php.www.log
|
||||
;php_admin_flag[log_errors] = on
|
||||
;php_admin_value[memory_limit] = 32M
|
||||
@@ -1,56 +0,0 @@
|
||||
[PHP]
|
||||
expose_php = Off
|
||||
disable_functions = exec,system,popen,passthru,apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,virtual,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority
|
||||
enable_dl = Off
|
||||
allow_url_fopen = On
|
||||
allow_url_include = Off
|
||||
engine = On
|
||||
short_open_tag = On
|
||||
output_buffering = 4096
|
||||
realpath_cache_size = 4096k
|
||||
realpath_cache_ttl = 600
|
||||
include_path = .:/usr/share/php
|
||||
date.timezone = Europe/Paris
|
||||
default_socket_timeout = 10
|
||||
max_execution_time = 30
|
||||
max_input_time = 60
|
||||
max_input_vars = 1000
|
||||
memory_limit = 512M
|
||||
post_max_size = 32M
|
||||
file_uploads = On
|
||||
upload_tmp_dir = /tmp
|
||||
upload_max_filesize = 32M
|
||||
max_file_uploads = 20
|
||||
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
|
||||
display_errors = Off
|
||||
display_startup_errors = Off
|
||||
log_errors = On
|
||||
html_errors = On
|
||||
SMTP = mailcatcher
|
||||
smtp_port = 1025
|
||||
sendmail_path = /usr/sbin/sendmail -t -i
|
||||
mail_log = syslog
|
||||
session.save_handler = memcached
|
||||
session.save_path = memcached:11211
|
||||
session.use_cookies = 1
|
||||
session.cookie_secure =
|
||||
session.use_only_cookies = 1
|
||||
session.name = PHPSESSID
|
||||
session.auto_start = 0
|
||||
session.cookie_lifetime = 0
|
||||
session.cookie_path = /
|
||||
session.cookie_domain =
|
||||
session.cookie_httponly =
|
||||
session.serialize_handler = php
|
||||
session.gc_probability = 0
|
||||
session.gc_divisor = 1000
|
||||
session.gc_maxlifetime = 2592000
|
||||
session.bug_compat_42 = Off
|
||||
session.bug_compat_warn = Off
|
||||
session.referer_check =
|
||||
session.entropy_length = 512
|
||||
session.entropy_file = /dev/urandom
|
||||
session.cache_limiter = nocache
|
||||
session.cache_expire = 180
|
||||
session.use_trans_sid = 0
|
||||
session.hash_function = 0
|
||||
@@ -1,13 +0,0 @@
|
||||
xdebug.collect_params = 1
|
||||
xdebug.collect_return = 1
|
||||
xdebug.default_enable = 1
|
||||
xdebug.force_display_errors = 1
|
||||
xdebug.force_error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
|
||||
xdebug.halt_level = E_WARNING
|
||||
xdebug.idekey = PHPSTORM
|
||||
xdebug.max_nesting_level = 1024
|
||||
xdebug.remote_enable = 1
|
||||
xdebug.remote_connect_back = 1
|
||||
xdebug.scream = 0
|
||||
xdebug.show_error_trace = 1
|
||||
xdebug.show_exception_trace = 1
|
||||
@@ -1,262 +0,0 @@
|
||||
FROM php:7.1-fpm-alpine as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG AMQP_VERSION=stable
|
||||
ARG AST_VERSION=stable
|
||||
ARG APCU_VERSION=stable
|
||||
ARG BLACKFIRE_VERSION=1.34.3
|
||||
ARG CACHETOOL_VERSION=4.0.1
|
||||
ARG DS_VERSION=stable
|
||||
ARG EVENT_VERSION=stable
|
||||
ARG IGBINARY_VERSION=stable
|
||||
ARG IMAGICK_VERSION=stable
|
||||
ARG GEOIP_VERSION=beta
|
||||
ARG GRPC_VERSION=stable
|
||||
ARG MCRYPT_VERSION=stable
|
||||
ARG MEMCACHE_VERSION=4.0.1-php73
|
||||
ARG MEMCACHED_VERSION=stable
|
||||
ARG MONGODB_VERSION=stable
|
||||
ARG NEWRELIC_VERSION=9.11.0.267
|
||||
ARG OAUTH_VERSION=stable
|
||||
ARG RAR_VERSION=stable
|
||||
ARG REDIS_VERSION=stable
|
||||
ARG SNUFFLEUPAGUS_VERSION=0.5.1
|
||||
ARG UUID_VERSION=stable
|
||||
ARG XDEBUG_VERSION=stable
|
||||
ARG XHPROF_VERSION=2.2.0
|
||||
ARG YAML_VERSION=stable
|
||||
|
||||
RUN apk --no-cache upgrade \
|
||||
&& apk add --no-cache --virtual .build-deps \
|
||||
$PHPIZE_DEPS \
|
||||
aspell-dev \
|
||||
bison \
|
||||
bzip2-dev \
|
||||
curl-dev \
|
||||
enchant-dev \
|
||||
flex \
|
||||
freetype-dev \
|
||||
gawk \
|
||||
geoip-dev \
|
||||
gettext-dev \
|
||||
gmp-dev \
|
||||
icu-dev \
|
||||
imagemagick-dev \
|
||||
imap-dev \
|
||||
libevent-dev \
|
||||
libjpeg-turbo-dev \
|
||||
libmcrypt-dev \
|
||||
libmemcached-dev \
|
||||
libpng-dev \
|
||||
libressl-dev \
|
||||
libxml2-dev \
|
||||
libxslt-dev \
|
||||
make \
|
||||
net-snmp-dev \
|
||||
openldap-dev \
|
||||
postgresql-dev \
|
||||
pcre-dev \
|
||||
rabbitmq-c-dev \
|
||||
yaml-dev \
|
||||
zlib-dev \
|
||||
# blackfire \
|
||||
&& wget https://packages.blackfire.io/binaries/blackfire-php/${BLACKFIRE_VERSION}/blackfire-php-alpine_amd64-php-$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;").so -O $(php -r "echo ini_get('extension_dir');")/blackfire.so \
|
||||
# gd \
|
||||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ \
|
||||
# memcache \
|
||||
&& wget https://github.com/websupport-sk/pecl-memcache/archive/v${MEMCACHE_VERSION}.tar.gz -O /tmp/memcache-${MEMCACHE_VERSION}.tar.gz \
|
||||
&& mkdir -p /tmp/memcache-${MEMCACHE_VERSION} \
|
||||
&& tar xzf /tmp/memcache-${MEMCACHE_VERSION}.tar.gz -C /tmp/memcache-${MEMCACHE_VERSION} --strip-components=1 \
|
||||
# https://github.com/websupport-sk/pecl-memcache/pull/39 \
|
||||
&& sed -i '399s/);/, char *);/' /tmp/memcache-${MEMCACHE_VERSION}/php7/memcache_pool.h \
|
||||
# https://github.com/websupport-sk/pecl-memcache/pull/40 \
|
||||
&& sed -i '47i#if PHP_VERSION_ID < 70200\n register size_t newlen;\n#endif' /tmp/memcache-${MEMCACHE_VERSION}/php7/memcache_pool.c \
|
||||
# newrelic \
|
||||
&& wget https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz -O /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz \
|
||||
&& mkdir -p /tmp/newrelic-${NEWRELIC_VERSION} \
|
||||
&& tar xzf /tmp/newrelic-${NEWRELIC_VERSION}.tar.gz -C /tmp/newrelic-${NEWRELIC_VERSION} --strip-components=1 \
|
||||
&& mv /tmp/newrelic-${NEWRELIC_VERSION}/agent/x64/newrelic-20160303.so $(php -r "echo ini_get('extension_dir');")/newrelic.so \
|
||||
# snuffleupagus \
|
||||
&& wget https://github.com/jvoisin/snuffleupagus/archive/v${SNUFFLEUPAGUS_VERSION}.tar.gz -O /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}.tar.gz \
|
||||
&& mkdir -p /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION} \
|
||||
&& tar xzf /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}.tar.gz -C /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION} --strip-components=1 \
|
||||
&& docker-php-ext-configure /tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}/src --prefix=/usr --enable-snuffleupagus \
|
||||
# xhprof \
|
||||
&& wget https://github.com/longxinH/xhprof/archive/v${XHPROF_VERSION}.tar.gz -O /tmp/xhprof-${XHPROF_VERSION}.tar.gz \
|
||||
&& mkdir -p /tmp/xhprof-${XHPROF_VERSION} \
|
||||
&& tar xzf /tmp/xhprof-${XHPROF_VERSION}.tar.gz -C /tmp/xhprof-${XHPROF_VERSION} --strip-components=1 \
|
||||
&& docker-php-ext-configure /tmp/xhprof-${XHPROF_VERSION}/extension --with-php-config=/usr/local/bin/php-config \
|
||||
&& docker-php-ext-install -j$(nproc) \
|
||||
bcmath \
|
||||
bz2 \
|
||||
calendar \
|
||||
dba \
|
||||
enchant \
|
||||
exif \
|
||||
gd \
|
||||
gettext \
|
||||
gmp \
|
||||
imap \
|
||||
intl \
|
||||
ldap \
|
||||
mcrypt \
|
||||
/tmp/memcache-${MEMCACHE_VERSION} \
|
||||
mysqli \
|
||||
opcache \
|
||||
pcntl \
|
||||
pdo_mysql \
|
||||
pdo_pgsql \
|
||||
pgsql \
|
||||
pspell \
|
||||
shmop \
|
||||
snmp \
|
||||
soap \
|
||||
sockets \
|
||||
sysvmsg \
|
||||
sysvsem \
|
||||
sysvshm \
|
||||
/tmp/xhprof-${XHPROF_VERSION}/extension \
|
||||
xmlrpc \
|
||||
xsl \
|
||||
zip \
|
||||
# docker-php-ext-install fails after snuffleupagus is enabled
|
||||
/tmp/snuffleupagus-${SNUFFLEUPAGUS_VERSION}/src \
|
||||
&& docker-php-source delete \
|
||||
&& rm /usr/local/etc/php/conf.d/docker-php-ext-* \
|
||||
&& rm -rf /tmp/memcache-* \
|
||||
&& rm -rf /tmp/newrelic-* \
|
||||
&& rm -rf /tmp/snuffleupagus-* \
|
||||
&& rm -rf /tmp/xhprof-* \
|
||||
&& pecl install amqp-${AMQP_VERSION} \
|
||||
&& pecl install apcu-${APCU_VERSION} \
|
||||
&& pecl install ast-${AST_VERSION} \
|
||||
&& pecl install ds-${DS_VERSION} \
|
||||
&& pecl install event-${EVENT_VERSION} \
|
||||
&& pecl install geoip-${GEOIP_VERSION} \
|
||||
&& pecl install grpc-${GRPC_VERSION} \
|
||||
&& pecl install igbinary-${IGBINARY_VERSION} \
|
||||
&& pecl install imagick-${IMAGICK_VERSION} \
|
||||
&& pecl install memcached-${MEMCACHED_VERSION} \
|
||||
&& pecl install mongodb-${MONGODB_VERSION} \
|
||||
&& pecl install oauth-${OAUTH_VERSION} \
|
||||
&& pecl install rar-${RAR_VERSION} \
|
||||
&& pecl install redis-${REDIS_VERSION} \
|
||||
&& echo |pecl install uuid-${UUID_VERSION} \
|
||||
&& pecl install xdebug-${XDEBUG_VERSION} \
|
||||
&& pecl install yaml-${YAML_VERSION} \
|
||||
&& pecl clear-cache \
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner --recursive /usr/local \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
| xargs -r apk info --installed \
|
||||
| sort -u \
|
||||
)" \
|
||||
&& apk del .build-deps \
|
||||
&& apk add --no-cache --virtual .run-deps $runDeps
|
||||
|
||||
RUN wget http://gordalina.github.io/cachetool/downloads/cachetool-${CACHETOOL_VERSION}.phar -O /usr/local/bin/cachetool \
|
||||
&& chmod +x /usr/local/bin/cachetool \
|
||||
&& echo -e "\
|
||||
adapter: fastcgi \n\
|
||||
fastcgi: 127.0.0.1:9000 \n\
|
||||
" > /etc/cachetool.yml
|
||||
|
||||
RUN mkdir -p /etc/ssh && echo -e "\
|
||||
Host * \n\
|
||||
Compression yes \n\
|
||||
" >> /etc/ssh/ssh_config
|
||||
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
bzip2 \
|
||||
coreutils \
|
||||
gettext \
|
||||
git \
|
||||
imagemagick \
|
||||
lftp \
|
||||
mailx \
|
||||
make \
|
||||
mysql-client \
|
||||
nano \
|
||||
openssh-client \
|
||||
ssmtp \
|
||||
vim
|
||||
|
||||
# Iconv fix: https://github.com/docker-library/php/issues/240#issuecomment-305038173
|
||||
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ gnu-libiconv
|
||||
ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so
|
||||
|
||||
# builtin modules : Core ctype curl date dom fileinfo filter ftp hash iconv json libxml mbstring mysqlnd openssl pcre PDO pdo_sqlite Phar posix readline Reflection session SimpleXML SPL sqlite3 standard tokenizer xml xmlreader xmlwriter zlib
|
||||
# available modules : amqp apcu ast bcmath blackfire bz2 calendar dba ds enchant event exif gd geoip gmp grpc igbinary imap imagick intl ldap mcrypt memcache memcached mongodb mysqli newrelic oauth opcache pcntl pdo_mysql pdo_pgsql pgsql pspell rar redis shmop snmp snuffleupagus soap sockets sysvmsg sysvsem sysvshm xhprof uuid wddx xdebug xhprof xmlrpc xsl yaml zip
|
||||
ARG PHP_EXT_ENABLE="amqp apcu bcmath bz2 calendar gd geoip imagick intl mcrypt memcached mysqli oauth opcache pdo_mysql redis soap sockets uuid yaml zip"
|
||||
RUN docker-php-ext-enable ${PHP_EXT_ENABLE}
|
||||
|
||||
# copy *.ini
|
||||
COPY ${DOCKER_BUILD_DIR}/*.ini /usr/local/etc/php/conf.d/
|
||||
COPY ${DOCKER_BUILD_DIR}/php-fpm-*.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
# custom php config
|
||||
ARG PHP_INI_CONFIG
|
||||
RUN echo -e ${PHP_INI_CONFIG// /\\n} >> /usr/local/etc/php/conf.d/config.ini
|
||||
|
||||
# custom php cli
|
||||
ARG PHP_CLI_CONFIG="apc.enable_cli=0 max_execution_time=-1 memory_limit=-1 opcache.enable_cli=0 xdebug.default_enable=0"
|
||||
RUN echo '#!/usr/bin/env sh' > /usr/local/bin/php-cli \
|
||||
&& chmod +x /usr/local/bin/php-cli \
|
||||
&& echo -e "\
|
||||
/usr/local/bin/php -d ${PHP_CLI_CONFIG// / -d } \"\$@\"\
|
||||
" >> /usr/local/bin/php-cli
|
||||
|
||||
# install cronlock
|
||||
ADD https://raw.github.com/kvz/cronlock/master/cronlock /usr/bin/cronlock
|
||||
RUN chmod +rx /usr/bin/cronlock
|
||||
|
||||
# config ssmtp
|
||||
RUN echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf
|
||||
|
||||
# https://bugs.php.net/bug.php?id=71880
|
||||
ENV LOG_STREAM="/tmp/stdout"
|
||||
RUN mkfifo $LOG_STREAM && chmod 777 $LOG_STREAM
|
||||
|
||||
# default www-data homedir to /var/www for crontabs
|
||||
RUN sed -i 's|/home/www-data|/var/www|' /etc/passwd
|
||||
WORKDIR /var/www
|
||||
|
||||
# redirect LOG_STREAM to stdout and start php-fpm with environment variables from .env
|
||||
CMD [ "sh", "-c", "(exec 3<>$LOG_STREAM; cat <&3 >&1 & IFS=$'\n'; exec env $(cat .env 2>/dev/null) php-fpm)" ]
|
||||
|
||||
FROM dist as master
|
||||
ARG UID
|
||||
ARG USER
|
||||
ENV UID=${UID}
|
||||
ENV GID=${UID}
|
||||
ENV USER=${USER}
|
||||
|
||||
# If we provide a specific UID
|
||||
RUN let $UID >/dev/null 2>&1 \
|
||||
# Remove user with $UID if it is not our $USER
|
||||
&& if [ "$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')" != "$USER" ]; then \
|
||||
sed -i '/^'$(getent passwd $UID |awk 'BEGIN {FS=":"} {print $1}')':x:'$UID':/d' /etc/passwd; \
|
||||
sed -i '/^'$(getent group $GID |awk 'BEGIN {FS=":"} {print $1}')':x:'$GID':/d' /etc/group; \
|
||||
fi \
|
||||
# Force $UID if our $USER already exists
|
||||
&& sed -i 's/^'$USER':x:[0-9]\+:[0-9]\+:/'$USER':x:'$UID':'$GID':/' /etc/passwd \
|
||||
&& sed -i 's/^'$USER':x:[0-9]\+:/'$USER':x:'$GID':/' /etc/group \
|
||||
# Create $USER if it does not exist
|
||||
&& if [ "$(getent passwd $UID)" = "" ]; then \
|
||||
echo "$USER:x:$UID:$GID::/home/$USER:/bin/false" >> /etc/passwd; \
|
||||
echo "$USER:!:$(($(date +%s) / 60 / 60 / 24)):0:99999:7:::" >> /etc/shadow; \
|
||||
echo "$USER:x:$GID:" >> /etc/group; \
|
||||
fi \
|
||||
&& mkdir -p /home/$USER \
|
||||
&& chown $UID:$GID /home/$USER \
|
||||
|| true
|
||||
|
||||
RUN chown -R $USER /usr/local/etc/php/conf.d/
|
||||
|
||||
USER $USER
|
||||
|
||||
ARG SSH_REMOTE_HOSTS
|
||||
|
||||
RUN mkdir -p ~/.ssh \
|
||||
&& ssh-keyscan -t rsa -H $SSH_REMOTE_HOSTS >> ~/.ssh/known_hosts
|
||||
@@ -1,5 +0,0 @@
|
||||
apc.enable_cli = 0
|
||||
apc.enabled = 1
|
||||
apc.shm_segments = 1
|
||||
apc.shm_size = 32M
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
blackfire.agent_socket=tcp://blackfire:8707
|
||||
@@ -1 +0,0 @@
|
||||
memcached.sess_locking = Off
|
||||
@@ -1,4 +0,0 @@
|
||||
[newrelic]
|
||||
newrelic.logfile = /dev/self/fd/2
|
||||
newrelic.daemon.logfile = /dev/self/fd/2
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
opcache.enable = 1
|
||||
opcache.enable_cli = 0
|
||||
opcache.error_log = /proc/self/fd/2
|
||||
opcache.interned_strings_buffer = 16
|
||||
opcache.log_verbosity_level = 2
|
||||
opcache.max_accelerated_files = 20000
|
||||
opcache.memory_consumption = 256
|
||||
opcache.validate_timestamps = 1
|
||||
@@ -1,412 +0,0 @@
|
||||
; Start a new pool named 'www'.
|
||||
; the variable $pool can we used in any directive and will be replaced by the
|
||||
; pool name ('www' here)
|
||||
[www]
|
||||
|
||||
; Per pool prefix
|
||||
; It only applies on the following directives:
|
||||
; - 'access.log'
|
||||
; - 'slowlog'
|
||||
; - 'listen' (unixsocket)
|
||||
; - 'chroot'
|
||||
; - 'chdir'
|
||||
; - 'php_values'
|
||||
; - 'php_admin_values'
|
||||
; When not set, the global prefix (or /usr) applies instead.
|
||||
; Note: This directive can also be relative to the global prefix.
|
||||
; Default Value: none
|
||||
;prefix = /path/to/pools/$pool
|
||||
|
||||
; Unix user/group of processes
|
||||
; Note: The user is mandatory. If the group is not set, the default user's group
|
||||
; will be used.
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
; The address on which to accept FastCGI requests.
|
||||
; Valid syntaxes are:
|
||||
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
|
||||
; a specific port;
|
||||
; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
|
||||
; a specific port;
|
||||
; 'port' - to listen on a TCP socket to all IPv4 addresses on a
|
||||
; specific port;
|
||||
; '[::]:port' - to listen on a TCP socket to all addresses
|
||||
; (IPv6 and IPv4-mapped) on a specific port;
|
||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
; Note: This value is mandatory.
|
||||
;listen = /var/run/php5-fpm.sock
|
||||
listen = 0.0.0.0:9000
|
||||
|
||||
; Set listen(2) backlog.
|
||||
; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
|
||||
listen.backlog = 1023
|
||||
|
||||
; Set permissions for unix socket, if one is used. In Linux, read/write
|
||||
; permissions must be set in order to allow connections from a web server. Many
|
||||
; BSD-derived systems allow connections regardless of permissions.
|
||||
; Default Values: user and group are set as the running user
|
||||
; mode is set to 0660
|
||||
;listen.owner = www-data
|
||||
;listen.group = www-data
|
||||
;listen.mode = 0660
|
||||
; When POSIX Access Control Lists are supported you can set them using
|
||||
; these options, value is a comma separated list of user/group names.
|
||||
; When set, listen.owner and listen.group are ignored
|
||||
;listen.acl_users =
|
||||
;listen.acl_groups =
|
||||
|
||||
; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
|
||||
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
|
||||
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
|
||||
; must be separated by a comma. If this value is left blank, connections will be
|
||||
; accepted from any ip address.
|
||||
; Default Value: any
|
||||
;listen.allowed_clients = 0.0.0.0
|
||||
|
||||
; Specify the nice(2) priority to apply to the pool processes (only if set)
|
||||
; The value can vary from -19 (highest priority) to 20 (lower priority)
|
||||
; Note: - It will only work if the FPM master process is launched as root
|
||||
; - The pool processes will inherit the master process priority
|
||||
; unless it specified otherwise
|
||||
; Default Value: no set
|
||||
; process.priority = -19
|
||||
|
||||
; Choose how the process manager will control the number of child processes.
|
||||
; Possible Values:
|
||||
; static - a fixed number (pm.max_children) of child processes;
|
||||
; dynamic - the number of child processes are set dynamically based on the
|
||||
; following directives. With this process management, there will be
|
||||
; always at least 1 children.
|
||||
; pm.max_children - the maximum number of children that can
|
||||
; be alive at the same time.
|
||||
; pm.start_servers - the number of children created on startup.
|
||||
; pm.min_spare_servers - the minimum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is less than this
|
||||
; number then some children will be created.
|
||||
; pm.max_spare_servers - the maximum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is greater than this
|
||||
; number then some children will be killed.
|
||||
; ondemand - no children are created at startup. Children will be forked when
|
||||
; new requests will connect. The following parameter are used:
|
||||
; pm.max_children - the maximum number of children that
|
||||
; can be alive at the same time.
|
||||
; pm.process_idle_timeout - The number of seconds after which
|
||||
; an idle process will be killed.
|
||||
; Note: This value is mandatory.
|
||||
pm = dynamic
|
||||
|
||||
; The number of child processes to be created when pm is set to 'static' and the
|
||||
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
|
||||
; This value sets the limit on the number of simultaneous requests that will be
|
||||
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
|
||||
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
|
||||
; CGI. The below defaults are based on a server without much resources. Don't
|
||||
; forget to tweak pm.* to fit your needs.
|
||||
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
|
||||
; Note: This value is mandatory.
|
||||
pm.max_children = 16
|
||||
|
||||
; The number of child processes created on startup.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
|
||||
pm.start_servers = 2
|
||||
|
||||
; The desired minimum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.min_spare_servers = 1
|
||||
|
||||
; The desired maximum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.max_spare_servers = 3
|
||||
|
||||
; The number of seconds after which an idle process will be killed.
|
||||
; Note: Used only when pm is set to 'ondemand'
|
||||
; Default Value: 10s
|
||||
;pm.process_idle_timeout = 10s;
|
||||
|
||||
; The number of requests each child process should execute before respawning.
|
||||
; This can be useful to work around memory leaks in 3rd party libraries. For
|
||||
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
||||
; Default Value: 0
|
||||
;pm.max_requests = 500
|
||||
|
||||
; The URI to view the FPM status page. If this value is not set, no URI will be
|
||||
; recognized as a status page. It shows the following informations:
|
||||
; pool - the name of the pool;
|
||||
; process manager - static, dynamic or ondemand;
|
||||
; start time - the date and time FPM has started;
|
||||
; start since - number of seconds since FPM has started;
|
||||
; accepted conn - the number of request accepted by the pool;
|
||||
; listen queue - the number of request in the queue of pending
|
||||
; connections (see backlog in listen(2));
|
||||
; max listen queue - the maximum number of requests in the queue
|
||||
; of pending connections since FPM has started;
|
||||
; listen queue len - the size of the socket queue of pending connections;
|
||||
; idle processes - the number of idle processes;
|
||||
; active processes - the number of active processes;
|
||||
; total processes - the number of idle + active processes;
|
||||
; max active processes - the maximum number of active processes since FPM
|
||||
; has started;
|
||||
; max children reached - number of times, the process limit has been reached,
|
||||
; when pm tries to start more children (works only for
|
||||
; pm 'dynamic' and 'ondemand');
|
||||
; Value are updated in real time.
|
||||
; Example output:
|
||||
; pool: www
|
||||
; process manager: static
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 62636
|
||||
; accepted conn: 190460
|
||||
; listen queue: 0
|
||||
; max listen queue: 1
|
||||
; listen queue len: 42
|
||||
; idle processes: 4
|
||||
; active processes: 11
|
||||
; total processes: 15
|
||||
; max active processes: 12
|
||||
; max children reached: 0
|
||||
;
|
||||
; By default the status page output is formatted as text/plain. Passing either
|
||||
; 'html', 'xml' or 'json' in the query string will return the corresponding
|
||||
; output syntax. Example:
|
||||
; http://www.foo.bar/status
|
||||
; http://www.foo.bar/status?json
|
||||
; http://www.foo.bar/status?html
|
||||
; http://www.foo.bar/status?xml
|
||||
;
|
||||
; By default the status page only outputs short status. Passing 'full' in the
|
||||
; query string will also return status for each pool process.
|
||||
; Example:
|
||||
; http://www.foo.bar/status?full
|
||||
; http://www.foo.bar/status?json&full
|
||||
; http://www.foo.bar/status?html&full
|
||||
; http://www.foo.bar/status?xml&full
|
||||
; The Full status returns for each process:
|
||||
; pid - the PID of the process;
|
||||
; state - the state of the process (Idle, Running, ...);
|
||||
; start time - the date and time the process has started;
|
||||
; start since - the number of seconds since the process has started;
|
||||
; requests - the number of requests the process has served;
|
||||
; request duration - the duration in µs of the requests;
|
||||
; request method - the request method (GET, POST, ...);
|
||||
; request URI - the request URI with the query string;
|
||||
; content length - the content length of the request (only with POST);
|
||||
; user - the user (PHP_AUTH_USER) (or '-' if not set);
|
||||
; script - the main script called (or '-' if not set);
|
||||
; last request cpu - the %cpu the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because CPU calculation is done when the request
|
||||
; processing has terminated;
|
||||
; last request memory - the max amount of memory the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because memory calculation is done when the request
|
||||
; processing has terminated;
|
||||
; If the process is in Idle state, then informations are related to the
|
||||
; last request the process has served. Otherwise informations are related to
|
||||
; the current request being served.
|
||||
; Example output:
|
||||
; ************************
|
||||
; pid: 31330
|
||||
; state: Running
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 63087
|
||||
; requests: 12808
|
||||
; request duration: 1250261
|
||||
; request method: GET
|
||||
; request URI: /test_mem.php?N=10000
|
||||
; content length: 0
|
||||
; user: -
|
||||
; script: /home/fat/web/docs/php/test_mem.php
|
||||
; last request cpu: 0.00
|
||||
; last request memory: 0
|
||||
;
|
||||
; Note: There is a real-time FPM status monitoring sample web page available
|
||||
; It's available in: /usr/share/php5/fpm/status.html
|
||||
;
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
pm.status_path = /php-fpm-status
|
||||
|
||||
; The ping URI to call the monitoring page of FPM. If this value is not set, no
|
||||
; URI will be recognized as a ping page. This could be used to test from outside
|
||||
; that FPM is alive and responding, or to
|
||||
; - create a graph of FPM availability (rrd or such);
|
||||
; - remove a server from a group if it is not responding (load balancing);
|
||||
; - trigger alerts for the operating team (24/7).
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
ping.path = /php-fpm-ping
|
||||
|
||||
; This directive may be used to customize the response of a ping request. The
|
||||
; response is formatted as text/plain with a 200 response code.
|
||||
; Default Value: pong
|
||||
;ping.response = pong
|
||||
|
||||
; The access log file
|
||||
; Default: not set
|
||||
;access.log = log/$pool.access.log
|
||||
|
||||
; The access log format.
|
||||
; The following syntax is allowed
|
||||
; %%: the '%' character
|
||||
; %C: %CPU used by the request
|
||||
; it can accept the following format:
|
||||
; - %{user}C for user CPU only
|
||||
; - %{system}C for system CPU only
|
||||
; - %{total}C for user + system CPU (default)
|
||||
; %d: time taken to serve the request
|
||||
; it can accept the following format:
|
||||
; - %{seconds}d (default)
|
||||
; - %{miliseconds}d
|
||||
; - %{mili}d
|
||||
; - %{microseconds}d
|
||||
; - %{micro}d
|
||||
; %e: an environment variable (same as $_ENV or $_SERVER)
|
||||
; it must be associated with embraces to specify the name of the env
|
||||
; variable. Some exemples:
|
||||
; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
|
||||
; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
|
||||
; %f: script filename
|
||||
; %l: content-length of the request (for POST request only)
|
||||
; %m: request method
|
||||
; %M: peak of memory allocated by PHP
|
||||
; it can accept the following format:
|
||||
; - %{bytes}M (default)
|
||||
; - %{kilobytes}M
|
||||
; - %{kilo}M
|
||||
; - %{megabytes}M
|
||||
; - %{mega}M
|
||||
; %n: pool name
|
||||
; %o: output header
|
||||
; it must be associated with embraces to specify the name of the header:
|
||||
; - %{Content-Type}o
|
||||
; - %{X-Powered-By}o
|
||||
; - %{Transfert-Encoding}o
|
||||
; - ....
|
||||
; %p: PID of the child that serviced the request
|
||||
; %P: PID of the parent of the child that serviced the request
|
||||
; %q: the query string
|
||||
; %Q: the '?' character if query string exists
|
||||
; %r: the request URI (without the query string, see %q and %Q)
|
||||
; %R: remote IP address
|
||||
; %s: status (response code)
|
||||
; %t: server time the request was received
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; %T: time the log has been written (the request has finished)
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; %u: remote user
|
||||
;
|
||||
; Default: "%R - %u %t \"%m %r\" %s"
|
||||
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
|
||||
|
||||
; The log file for slow requests
|
||||
; Default Value: not set
|
||||
; Note: slowlog is mandatory if request_slowlog_timeout is set
|
||||
;slowlog = log/$pool.log.slow
|
||||
|
||||
; The timeout for serving a single request after which a PHP backtrace will be
|
||||
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_slowlog_timeout = 0
|
||||
|
||||
; The timeout for serving a single request after which the worker process will
|
||||
; be killed. This option should be used when the 'max_execution_time' ini option
|
||||
; does not stop script execution for some reason. A value of '0' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_terminate_timeout = 5m
|
||||
|
||||
; Set open file descriptor rlimit.
|
||||
; Default Value: system defined value
|
||||
;rlimit_files = 1024
|
||||
|
||||
; Set max core size rlimit.
|
||||
; Possible Values: 'unlimited' or an integer greater or equal to 0
|
||||
; Default Value: system defined value
|
||||
;rlimit_core = 0
|
||||
|
||||
; Chroot to this directory at the start. This value must be defined as an
|
||||
; absolute path. When this value is not set, chroot is not used.
|
||||
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
|
||||
; of its subdirectories. If the pool prefix is not set, the global prefix
|
||||
; will be used instead.
|
||||
; Note: chrooting is a great security feature and should be used whenever
|
||||
; possible. However, all PHP paths will be relative to the chroot
|
||||
; (error_log, sessions.save_path, ...).
|
||||
; Default Value: not set
|
||||
;chroot =
|
||||
|
||||
; Chdir to this directory at the start.
|
||||
; Note: relative path can be used.
|
||||
; Default Value: current directory or / when chroot
|
||||
chdir = /
|
||||
|
||||
; Redirect worker stdout and stderr into main error log. If not set, stdout and
|
||||
; stderr will be redirected to /dev/null according to FastCGI specs.
|
||||
; Note: on highloaded environement, this can cause some delay in the page
|
||||
; process time (several ms).
|
||||
; Default Value: no
|
||||
catch_workers_output = yes
|
||||
|
||||
; Clear environment in FPM workers
|
||||
; Prevents arbitrary environment variables from reaching FPM worker processes
|
||||
; by clearing the environment in workers before env vars specified in this
|
||||
; pool configuration are added.
|
||||
; Setting to "no" will make all environment variables available to PHP code
|
||||
; via getenv(), $_ENV and $_SERVER.
|
||||
; Default Value: yes
|
||||
;clear_env = no
|
||||
|
||||
; Limits the extensions of the main script FPM will allow to parse. This can
|
||||
; prevent configuration mistakes on the web server side. You should only limit
|
||||
; FPM to .php extensions to prevent malicious users to use other extensions to
|
||||
; exectute php code.
|
||||
; Note: set an empty value to allow all extensions.
|
||||
; Default Value: .php
|
||||
;security.limit_extensions = .php .php3 .php4 .php5
|
||||
|
||||
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
|
||||
; the current environment.
|
||||
; Default Value: clean env
|
||||
;env[HOSTNAME] = $HOSTNAME
|
||||
;env[PATH] = /usr/local/bin:/usr/bin:/bin
|
||||
;env[TMP] = /tmp
|
||||
;env[TMPDIR] = /tmp
|
||||
;env[TEMP] = /tmp
|
||||
|
||||
; Additional php.ini defines, specific to this pool of workers. These settings
|
||||
; overwrite the values previously defined in the php.ini. The directives are the
|
||||
; same as the PHP SAPI:
|
||||
; php_value/php_flag - you can set classic ini defines which can
|
||||
; be overwritten from PHP call 'ini_set'.
|
||||
; php_admin_value/php_admin_flag - these directives won't be overwritten by
|
||||
; PHP call 'ini_set'
|
||||
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
|
||||
|
||||
; Defining 'extension' will load the corresponding shared extension from
|
||||
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
|
||||
; overwrite previously defined php.ini values, but will append the new value
|
||||
; instead.
|
||||
|
||||
; Note: path INI options can be relative and will be expanded with the prefix
|
||||
; (pool, global or /usr)
|
||||
|
||||
; Default Value: nothing is defined by default except the values in php.ini and
|
||||
; specified at startup with the -d argument
|
||||
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
|
||||
;php_flag[display_errors] = off
|
||||
;php_admin_value[error_log] = /var/log/fpm-php.www.log
|
||||
;php_admin_flag[log_errors] = on
|
||||
;php_admin_value[memory_limit] = 32M
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user