1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +02:00

initial nix based docker images

This commit is contained in:
Robin Appelman 2025-06-07 18:24:39 +02:00
commit 06bf3b4b62
72 changed files with 472 additions and 789 deletions

View file

@ -5,64 +5,37 @@ on:
branches: ["main"] branches: ["main"]
paths: paths:
- ".forgejo/**" - ".forgejo/**"
- "images/**" - "nix/image/**"
permissions: permissions:
contents: read contents: read
jobs: jobs:
build-images: build-images:
runs-on: ubuntu-latest runs-on: nix
strategy: strategy:
matrix: matrix:
php-version: ["8.1", "8.2", "8.3", "8.4"] php-version: ["8.1", "8.2", "8.3", "8.4"]
variant: ["", "-dbg"] variant: [""]
name: haze-${{ matrix.php-version }}${{ matrix.variant }} name: haze-${{ matrix.php-version }}${{ matrix.variant }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- uses: https://codeberg.org/icewind/attic-action@v1
- uses: https://github.com/dorny/paths-filter@v3
id: changes
with: with:
filters: | name: link
php: instance: https://cache.icewind.link
- '.forgejo/**' authToken: "${{ secrets.ATTIC_TOKEN }}"
- 'images/php/**'
haze:
- '.forgejo/**'
- 'images/php/**'
- 'images/haze/**'
- name: Log in to the Container registry - name: Build image
uses: https://github.com/docker/login-action@v3 run: |
with: nix build .#'"haze-image-php-${{ matrix.php-version }}"'
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx - name: Push image
uses: https://github.com/docker/setup-buildx-action@v3 if: github.ref == 'refs/heads/main'
run: |
- name: Build php image skopeo copy --insecure-policy --dest-creds="${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }}" \
if: steps.changes.outputs.php == 'true' "docker-archive:$(nix build .#'"haze-image-php-${{ matrix.php-version }}"' --print-out-paths)" "docker://icewind1991/haze:${{ matrix.php-version }}"
uses: https://github.com/docker/build-push-action@v5
with:
context: "images/php"
push: true
tags: icewind1991/haze-php:${{ matrix.php-version }}${{ matrix.variant }}
build-args: |
PHP_VERSION=${{ matrix.php-version }}
BASE_IMAGE=${{ matrix.variant == '-dbg' && 'icewind1991/php-dbg' || 'php' }}
- name: Build haze image
if: steps.changes.outputs.haze == 'true'
uses: https://github.com/docker/build-push-action@v5
with:
context: "images/haze"
push: true
tags: icewind1991/haze:${{ matrix.php-version }}${{ matrix.variant }}
build-args: |
PHP_VERSION=${{ matrix.php-version }}${{ matrix.variant }}

101
README.md
View file

@ -6,8 +6,8 @@ Easy setup and management of Nextcloud test instances using docker
## What ## What
`haze` provides an easy way to setup Nextcloud test instances with a choice of php version, database server, optional s3 `haze` provides an easy way to setup Nextcloud test instances with a choice of
or ldap setup and more. php version, database server, optional s3 or ldap setup and more.
## Setup ## Setup
@ -17,7 +17,9 @@ or ldap setup and more.
### Installation ### Installation
- Grab a binary from the [github releases](https://github.com/icewind1991/haze/releases) and place it in your `$PATH` - Grab a binary from the
[github releases](https://github.com/icewind1991/haze/releases) and place it
in your `$PATH`
### Config ### Config
@ -31,13 +33,15 @@ See the [configuration section](#configuration) for more options.
### Quick examples ### Quick examples
- Start a Nextcloud instance with `postgresql`, `php 8.1` and `s3` primary storage: - Start a Nextcloud instance with `postgresql`, `php 8.1` and `s3` primary
storage:
```bash ```bash
haze start pgsq s3 haze start pgsq s3
``` ```
- Start a Nextcloud instance with `sqlite`, `php 8.2` and an `smb` external storage: - Start a Nextcloud instance with `sqlite`, `php 8.2` and an `smb` external
storage:
```bash ```bash
haze start 8.2 smb haze start 8.2 smb
@ -56,19 +60,22 @@ See the [configuration section](#configuration) for more options.
haze start [database] [php-version] [services] haze start [database] [php-version] [services]
``` ```
Where `database` is one of `sqlite`, `mysql`, `mariadb`, `pgsql` or `oracle` with an optional version (e.g. `pgsql:12`), Where `database` is one of `sqlite`, `mysql`, `mariadb`, `pgsql` or `oracle`
defaults to `sqlite`. with an optional version (e.g. `pgsql:12`), defaults to `sqlite`. And
And `php-version` is one of `8.1`, `8.2`, `8.3`, defaults to `8.1`. `7.3` and `7.4` and `8.0` are still supported but `php-version` is one of `8.1`, `8.2`, `8.3`, defaults to `8.1`. `7.3` and `7.4`
the docker images for those versions aren't being updated anymore so they might be missing some newer features. and `8.0` are still supported but the docker images for those versions aren't
being updated anymore so they might be missing some newer features.
Each php version also comes with a `-dbg` variant that has php compiled in debug mode and can be used for debugging php Each php version also comes with a `-dbg` variant that has php compiled in debug
itself with gdb. mode and can be used for debugging php itself with gdb.
Additionally, you can use the following options when starting an instance: Additionally, you can use the following options when starting an instance:
- `s3`: setup an S3 server and configure to Nextcloud to use it as primary storage. - `s3`: setup an S3 server and configure to Nextcloud to use it as primary
- `<path to app.tar.gz>`: by specifying the path to an app package this package will be extracted into the apps. storage.
directory of the new instance (overwriting any existing app code). This can be used to quickly test a packaged app. - `<path to app.tar.gz>`: by specifying the path to an app package this package
will be extracted into the apps. directory of the new instance (overwriting
any existing app code). This can be used to quickly test a packaged app.
- `ldap`: setup an LDAP server. - `ldap`: setup an LDAP server.
- `office`: setup a Nextcloud Office server. - `office`: setup a Nextcloud Office server.
- `onlyoffice` setup an onlyoffice document server. - `onlyoffice` setup an onlyoffice document server.
@ -76,14 +83,16 @@ Additionally, you can use the following options when starting an instance:
- `smb`: setup a samba server for external storage use. - `smb`: setup a samba server for external storage use.
- `dav`: setup a WebDAV server for external storage use. - `dav`: setup a WebDAV server for external storage use.
- `sftp`: setup a SFTP server for external storage use. - `sftp`: setup a SFTP server for external storage use.
- `kaspersky`: setup a kaspersky scan engine server in http mode. ( - `kaspersky`: setup a kaspersky scan engine server in http mode. ( Requires
Requires [manually setting up the image](https://github.com/icewind1991/kaspersky-docker)) [manually setting up the image](https://github.com/icewind1991/kaspersky-docker))
- `kaspersky-icap`: setup a kaspersky scan engine server in ICAP mode. - `kaspersky-icap`: setup a kaspersky scan engine server in ICAP mode.
- `clamav-icap`: setup a clam av scanner in ICAP mode. - `clamav-icap`: setup a clam av scanner in ICAP mode.
- `clamav-icap-tls`: setup a clam av scanner in ICAP mode with TLS encryption. - `clamav-icap-tls`: setup a clam av scanner in ICAP mode with TLS encryption.
- `oc`: start an ownCloud instance in the same network. - `oc`: start an ownCloud instance in the same network.
- `imaginary`: start an Imaginary service and configure it for preview generation. - `imaginary`: start an Imaginary service and configure it for preview
- `mail`: start an [smtp4dev](https://github.com/rnwood/smtp4dev) server and configure it the mail server. generation.
- `mail`: start an [smtp4dev](https://github.com/rnwood/smtp4dev) server and
configure it the mail server.
- `redis-tls`: connect to redis over TLS. - `redis-tls`: connect to redis over TLS.
- The name of any configured preset. - The name of any configured preset.
@ -93,7 +102,8 @@ Additionally, you can use the following options when starting an instance:
haze test [database] [php-version] [path] haze test [database] [php-version] [path]
``` ```
Where `path` is a file or folder to run phpunit in, relative to the sources root. Where `path` is a file or folder to run phpunit in, relative to the sources
root.
### List running instances ### List running instances
@ -115,8 +125,8 @@ haze clean
## Controlling running instances ## Controlling running instances
The following commands run against the most recently started instance and allow optionally providing a `match` to select The following commands run against the most recently started instance and allow
a specific instance by it's name. optionally providing a `match` to select a specific instance by it's name.
#### Open an instance #### Open an instance
@ -190,50 +200,57 @@ haze [match] unpin
haze [match] env <cmd> [args] haze [match] env <cmd> [args]
``` ```
Runs the provided command with `NEXTCLOUD_URL`, `DATABASE_URL` and `REDIS_URL` environment variables set for the matched Runs the provided command with `NEXTCLOUD_URL`, `DATABASE_URL` and `REDIS_URL`
instance. environment variables set for the matched instance.
This is indented to run a local [push daemon](https://github.com/nextcloud/notify_push) against an instance. This is indented to run a local
[push daemon](https://github.com/nextcloud/notify_push) against an instance.
## Federation ## Federation
Multiple instances can reach each other by using their instance name as domain name to allow for testing federation Multiple instances can reach each other by using their instance name as domain
between instances. name to allow for testing federation between instances. Alternatively, you can
Alternatively, you can setup the haze proxy and the proxied domains to get https support between instances. setup the haze proxy and the proxied domains to get https support between
instances.
## Proxy ## Proxy
By default, instances can be accessed by their IP. In order to get more memorable urls and allow supporting https, By default, instances can be accessed by their IP. In order to get more
haze comes with a builtin reverse proxy to allow using a wildcard domain. memorable urls and allow supporting https, haze comes with a builtin reverse
proxy to allow using a wildcard domain.
### Requirements ### Requirements
- A domain name you can set wildcard DNS records for - A domain name you can set wildcard DNS records for
- A reverse proxy like nginx or apache - A reverse proxy like nginx or apache
- (optionally) a wildcard ssl certificate (can be acquiring using letsencrypt and dns verification) - (optionally) a wildcard ssl certificate (can be acquiring using letsencrypt
and dns verification)
### Setup ### Setup
- Set a DNS record for `*.haze.exmaple.com` and `haze.example.com` pointing to your development machine. (127.0.0.1 will - Set a DNS record for `*.haze.exmaple.com` and `haze.example.com` pointing to
not work) your development machine. (127.0.0.1 will not work)
- Set the `proxy` configuration with your domain and desired listen endpoint - Set the `proxy` configuration with your domain and desired listen endpoint
- Setup a service to run `haze proxy` in the background as your own user. A systemd user service is recommended. - Setup a service to run `haze proxy` in the background as your own user. A
- Configure your reverse proxy of choice to proxy `*.haze.example.com` and `haze.example.com` to the proxy's listen systemd user service is recommended.
endpoint - Configure your reverse proxy of choice to proxy `*.haze.example.com` and
- (optional) acquire a wildcard ssl certificate for your domain and set your reverse proxy to use it. `haze.example.com` to the proxy's listen endpoint
This will be highly dependent on your DNS - (optional) acquire a wildcard ssl certificate for your domain and set your
provider, [this](https://community.letsencrypt.org/t/dns-providers-who-easily-integrate-with-lets-encrypt-dns-validation/86438) reverse proxy to use it. This will be highly dependent on your DNS provider,
[this](https://community.letsencrypt.org/t/dns-providers-who-easily-integrate-with-lets-encrypt-dns-validation/86438)
lists some DNS providers and supported ACME clients. lists some DNS providers and supported ACME clients.
### Usage ### Usage
When the proxy is configured, generated urls for the instances will use a subdomain of the configured domain, e.g. When the proxy is configured, generated urls for the instances will use a
the `rolling-bees` instance will be available at `rolling-bees.haze.example.com`. Additionally, `haze.example.com` will subdomain of the configured domain, e.g. the `rolling-bees` instance will be
automatically point to the last created instance. available at `rolling-bees.haze.example.com`. Additionally, `haze.example.com`
will automatically point to the last created instance.
## Configuration ## Configuration
Configuration is loaded from `~/.config/haze/haze.toml` and has the following options Configuration is loaded from `~/.config/haze/haze.toml` and has the following
options
```toml ```toml
sources_root = "/path/to/sources" # path of the nextcloud sources. required sources_root = "/path/to/sources" # path of the nextcloud sources. required

32
flake.lock generated
View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"crane": { "crane": {
"locked": { "locked": {
"lastModified": 1739936662, "lastModified": 1742394900,
"narHash": "sha256-x4syUjNUuRblR07nDPeLDP7DpphaBVbUaSoeZkFbGSk=", "narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "19de14aaeb869287647d9461cbd389187d8ecdb7", "rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -22,11 +22,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1741005720, "lastModified": 1748868585,
"narHash": "sha256-zNIvYFBOTGomaxknkZLO/7p6eorwwgvHeatN2YySBPQ=", "narHash": "sha256-DrrbahOQAwvNM8l5EuGxxkVS7X5/S59zcG0N9ZWQFhk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "flakelight", "repo": "flakelight",
"rev": "f996547e5d142853ab6d619858a605af516d1d67", "rev": "dfbecd12d99c1bf82906521a6a7d5b75d2aa1ca2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -44,11 +44,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1740783063, "lastModified": 1747926214,
"narHash": "sha256-nJ/tvNBWFNJtwtNG/KsqtVq4p3aitkEb1pRW0qHvmsk=", "narHash": "sha256-e/7klyoQpe9wsYeQIUfm/9Yqa78et24L+nSpsCz937k=",
"owner": "icewind1991", "owner": "icewind1991",
"repo": "mill-scale", "repo": "mill-scale",
"rev": "591ea924cfd3cd7932b385341fb0aad0a935bb46", "rev": "394979573123e5d4762d29cc78b5e11b3d35cc6b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -59,16 +59,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1740932899, "lastModified": 1749086602,
"narHash": "sha256-F0qDu2egq18M3edJwEOAE+D+VQ+yESK6YWPRQBfOqq8=", "narHash": "sha256-DJcgJMekoxVesl9kKjfLPix2Nbr42i7cpEHJiTnBUwU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1546c45c538633ae40b93e2d14e0bb6fd8f13347", "rev": "4792576cb003c994bd7cc1edada3129def20b27d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",
"ref": "nixos-24.11", "ref": "nixos-25.05",
"type": "indirect" "type": "indirect"
} }
}, },
@ -88,11 +88,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1740277845, "lastModified": 1742697269,
"narHash": "sha256-NNU0CdiaSbAeZ8tpDG4aFi9qtcdlItRvk8Xns9oBrVU=", "narHash": "sha256-Lpp0XyAtIl1oGJzNmTiTGLhTkcUjwSkEb0gOiNzYFGM=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "f933070c29f9c1c5457447a51903f27f76ebb519", "rev": "01973c84732f9275c50c5f075dd1f54cc04b3316",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,6 +1,6 @@
{ {
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-24.11"; nixpkgs.url = "nixpkgs/nixos-25.05";
flakelight = { flakelight = {
url = "github:nix-community/flakelight"; url = "github:nix-community/flakelight";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -19,10 +19,25 @@
"aarch64-unknown-linux-musl" "aarch64-unknown-linux-musl"
]; ];
nixpkgs.config = {
allowUnfree = true;
};
extraPaths = [ extraPaths = [
./redis-certificates ./redis-certificates
]; ];
withOverlays = [(import ./nix/overlay.nix)];
packages = {
"haze-image-php-8.4" = pkgs: pkgs.haze-image-php-84;
"haze-image-php-8.3" = pkgs: pkgs.haze-image-php-83;
"haze-image-php-8.2" = pkgs: pkgs.haze-image-php-82;
"haze-image-php-8.1" = pkgs: pkgs.haze-image-php-81;
};
tools = pkgs: with pkgs; [cargo-edit bacon skopeo];
homeModules = { homeModules = {
default = { default = {
pkgs, pkgs,

View file

@ -1,23 +0,0 @@
#!/usr/bin/env bash
set -e
export DOCKER_BUILDKIT=1
versions=("8.1" "8.2" "8.3" "8.4")
for version in "${versions[@]}"; do
echo "building haze-php-$version"
docker build --build-arg PHP_VERSION=$version -t "icewind1991/haze-php:$version" -f "php/Dockerfile" php
echo "building haze-php-$version-dbg"
docker build --build-arg BASE_IMAGE=icewind1991/php-dbg --build-arg PHP_VERSION=$version -t "icewind1991/haze-php:$version-dbg" -f "php/Dockerfile" php
done
for version in "${versions[@]}"; do
echo "building haze-$version"
docker build --build-arg PHP_VERSION=$version -t "icewind1991/haze:$version" -f "haze/Dockerfile" haze
echo "building haze-$version-dbg"
docker build --build-arg PHP_VERSION=$version-dbg -t "icewind1991/haze:$version-dbg" -f "haze/Dockerfile" haze
done
docker build -t "icewind1991/haze-ldap" -f "ldap/Dockerfile" ldap

View file

@ -1 +0,0 @@
.git

View file

@ -1,64 +0,0 @@
ARG PHP_VERSION
FROM icewind1991/haze-php:$PHP_VERSION
RUN DEBIAN_FRONTEND=noninteractive ;\
apt-get update && \
apt-get install --assume-yes \
cron \
redis-server \
smbclient \
npm \
sudo \
wget \
attr \
git \
neovim \
nano \
sqlite3 \
s3cmd \
gdb \
python3-pip \
procps \
rsnapshot \
# chromium \
ncat && \
apt-get install --assume-yes libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.1.35.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
wget https://phar.phpunit.de/phpunit-9.phar -O /usr/local/bin/phpunit.phar && \
curl -L https://github.com/harness/drone-cli/releases/latest/download/drone_linux_amd64.tar.gz | tar zx && \
install -t /usr/bin drone && \
wget https://github.com/vimeo/psalm/releases/latest/download/psalm.phar -O /usr/local/bin/psalm && \
chmod +x /usr/local/bin/psalm && \
touch /var/log/rsnapshot.log && \
chmod 0777 /var/log/rsnapshot.log && \
chmod 0777 /var/cache/rsnapshot
ADD misc/collaboraonline.sources /etc/apt/sources.list.d
RUN DEBIAN_FRONTEND=noninteractive ;\
wget -q -O - https://packages.blackfire.io/gpg.key | apt-key add - && \
echo "deb http://packages.blackfire.io/debian any main" >> /etc/apt/sources.list.d/blackfire.list && \
wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg -O /usr/share/keyrings/collaboraonline-release-keyring.gpg && \
apt-get update && \
apt-get install --assume-yes blackfire
RUN curl https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/bin/mc && \
chmod +x /usr/bin/mc
ADD configs /root/
ADD configs/nginx-app.conf /etc/nginx/
RUN mkdir --parent /var/log/cron
ADD configs/cron.conf /etc/oc-cron.conf
ADD misc/bootstrap.sh misc/occ misc/tests misc/phpunit misc/install misc/occ misc/integration misc/chromium-no-sandbox /usr/local/bin/
ADD configs/sudoers /etc/sudoers.d/haze
ADD configs/.s3cfg configs/.gdbinit configs/.aws /home/haze/
ADD rsnapshot.conf /etc/rsnapshot.conf
ADD redis-certificates /redis-certificates
ENV WEBROOT /var/www/html
ENV EDITOR /usr/bin/neovim
ENTRYPOINT ["bootstrap.sh"]

View file

@ -1,9 +0,0 @@
<?php
$AUTOCONFIG = [
'dbname' => 'haze',
'dbhost' => 'mysql',
'dbuser' => 'haze',
'dbpass' => 'haze',
'dbtype' => 'mysql'
];

View file

@ -1,102 +0,0 @@
#!/bin/sh
touch /var/log/nginx/access.log
touch /var/log/nginx/error.log
touch /var/log/cron/owncloud.log
cp /root/config.php /var/www/html/config/config.php
if [ "$SQL" = "mysql" ]
then
cp /root/autoconfig_mysql.php /var/www/html/config/autoconfig.php
fi
if [ "$SQL" = "mariadb" ]
then
cp /root/autoconfig_mariadb.php /var/www/html/config/autoconfig.php
fi
if [ "$SQL" = "pgsql" ]
then
cp /root/autoconfig_pgsql.php /var/www/html/config/autoconfig.php
fi
if [ "$SQL" = "oci" ]
then
cp /root/autoconfig_oci.php /var/www/html/config/autoconfig.php
fi
UID=${UID:-www-data}
GID=${GID:-www-data}
echo "Running as $UID:$GID"
chown -R $UID:$GID /var/www/html/data /var/www/html/config
chown $UID:$GID /var/www/html/core/skeleton /var/www/html/build/integration/vendor /var/www/html/build/integration/composer.lock /var/www/html/build/integration/output /var/www/html/build/integration/work /var/www/html/core/skeleton /var/www/.composer/cache /var/www/html/apps/spreed/tests/integration/vendor/composer
echo "{}" > /var/www/html/build/integration/composer.lock
echo "Starting server using $SQL database…"
tail --follow --retry /var/log/nginx/*.log /var/log/cron/owncloud.log &
if [ -n "$S3" ]
then
sed -i '/\/\/PLACEHOLDER/ r /root/s3.php' /var/www/html/config/config.php
fi
if [ -n "$S3MB" ]
then
sed -i '/\/\/PLACEHOLDER/ r /root/s3mb.php' /var/www/html/config/config.php
fi
if [ -n "$S3M" ]
then
sed -i '/\/\/PLACEHOLDER/ r /root/s3m.php' /var/www/html/config/config.php
fi
if [ -n "$SWIFT" ]
then
sed -i '/\/\/PLACEHOLDER/ r /root/swift.php' /var/www/html/config/config.php
fi
if [ -n "$SWIFTV3" ]
then
sed -i '/\/\/PLACEHOLDER/ r /root/swiftv3.php' /var/www/html/config/config.php
fi
if [ -n "$AZURE" ]
then
sed -i '/\/\/PLACEHOLDER/ r /root/azure.php' /var/www/html/config/config.php
fi
if [ -n "$REDIS_TLS" ]
then
sed -i '/\/\/PLACEHOLDER/ r /root/redis-tls.php' /var/www/html/config/config.php
else
sed -i '/\/\/PLACEHOLDER/ r /root/redis-default.php' /var/www/html/config/config.php
fi
if [ -n "$BLACKFIRE_SERVER_ID" ]
then
sh -c '
yes | blackfire agent:config --server-id=$BLACKFIRE_SERVER_ID --server-token=$BLACKFIRE_SERVER_TOKEN
mkdir /var/run/blackfire/
BLACKFIRE_LOG_LEVEL=4 BLACKFIRE_LOG_FILE=/var/log/agent.log blackfire agent &
'&
fi
crontab /etc/oc-cron.conf
/usr/sbin/cron -f &
if [ -n "$REDIS_TLS" ]
then
/usr/bin/redis-server --protected-mode no \
--tls-port 6379 --port 0 \
--tls-cert-file /redis-certificates/server.crt \
--tls-key-file /redis-certificates/server.key \
--tls-ca-cert-file /redis-certificates/ca.crt &
else
/usr/bin/redis-server --protected-mode no &
fi
/usr/local/bin/bootstrap-nginx.sh

View file

@ -1,3 +0,0 @@
#!/bin/sh
chromium --no-sandbox $@

View file

@ -1,4 +0,0 @@
Types: deb
URIs: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-debian11
Suites: ./
Signed-By: /usr/share/keyrings/collaboraonline-release-keyring.gpg

View file

@ -1,31 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIFSzCCAzOgAwIBAgIUeeghZlFLpiHZ4i5XoYSArRfBZEkwDQYJKoZIhvcNAQEL
BQAwNTETMBEGA1UECgwKUmVkaXMgVGVzdDEeMBwGA1UEAwwVQ2VydGlmaWNhdGUg
QXV0aG9yaXR5MB4XDTI1MDUwMTE3MzA0NFoXDTM1MDQyOTE3MzA0NFowNTETMBEG
A1UECgwKUmVkaXMgVGVzdDEeMBwGA1UEAwwVQ2VydGlmaWNhdGUgQXV0aG9yaXR5
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA1zHa4DZDvV/9816BBzXb
S/N9EWaZuFmkWy8XNcChMenZvHlOBoU2Ah+mcqBrbvpC4mmqCQVKK/URz8KU3ZlL
bI8VGPbysnBcXatVCCNEC6AcE6ZP32ULAmnxnLMAaZnXDUv2qvB/WGBO82pNTi2Y
JP814IpmvNLCr5P4ERu0qi0M1FRMKYN4lw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GiVu2RQXt0ByHSuNw7ansm+aNBEtA+RCgloBU643YhO3s3msw6s86dWQKBgHw3
K0tiGbRETRdyRmu8uqBY26MHy+toYD1Ji0LKGHqTfY2tHl0WG/26eRB64gFX7g24
NAb6o9dLv643qjHSqO+m8MEoOqApGki/0DomW0f3cn8zqqYNE6KyBD04+G3onqXi
lfYJCih/tbR66TTOPyK3JeGFMIjNxerrY3tx7yo5AoGBANnt3tWS3AMhvj2lzt6T
ILjKMC1Ker49BwCYAuIHPON9Garqu28OXTDBq8zd9NjgewtZgM7OTwEbsSgwbXBp
4t2u32s6Ao8CohaKYIWolzqnuLF75p7VPuUP+EiaKQdzbbTrSrtPWB6+9uSTZSp7
Jg4q5I4X0o5MLslUDD3EGXfc
-----END PRIVATE KEY-----

View file

@ -1,7 +0,0 @@
[ server_cert ]
keyUsage = digitalSignature, keyEncipherment
nsCertType = server
[ client_cert ]
keyUsage = digitalSignature, keyEncipherment
nsCertType = client

View file

@ -1,25 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIEMTCCAhmgAwIBAgIUR4/k25c8pqvW2XrWhNvVs1ZMKNgwDQYJKoZIhvcNAQEL
BQAwNTETMBEGA1UECgwKUmVkaXMgVGVzdDEeMBwGA1UEAwwVQ2VydGlmaWNhdGUg
QXV0aG9yaXR5MB4XDTI1MDUwMTE3MzA0NFoXDTI2MDUwMTE3MzA0NFowLDETMBEG
A1UECgwKUmVkaXMgVGVzdDEVMBMGA1UEAwwMR2VuZXJpYy1jZXJ0MIIBIjANBgkq
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzrKoci1Pj1mZr5eQCqH3GBYhJyucVkn6
uPaANs5srjM3IrwopWmkU1lVdfq+53JqOw9zW/1Y8rJCuvtW02OSonCKd/WVq7aU
6XAnYACaN3l0OW38VV/Zxz6kZVnmfmk73OSNLr8sbB5tnSq0B0hLQBbFf/EJS+Cr
FHN+nbhzxfidqmSNb7UEXDVNwC6RiVN+TK72KuAF/kC3i7lUT0sOAE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p /bin/cp
cmd_rm /bin/rm
cmd_rsync /usr/bin/rsync
cmd_logger /usr/bin/logger
retain alpha 6
retain beta 7
retain gamma 4
#retain delta 3
logfile /var/log/rsnapshot.log
lockfile /var/run/rsnapshot.pid
backup /var/www/html/data localhost/

View file

@ -1,96 +0,0 @@
ARG PHP_VERSION
ARG BASE_IMAGE=php
FROM ${BASE_IMAGE}:${PHP_VERSION}-fpm-bookworm
MAINTAINER Robin Appelman <robin@icewind.nl>
RUN DEBIAN_FRONTEND=noninteractive ;\
apt-get update && \
apt-get install --assume-yes \
bzip2 \
nginx \
libaio-dev \
wget \
unzip \
&& rm -rf /var/lib/apt/lists/*
ADD configure_gd.sh /
# php exceptions
RUN apt-get update \
&& apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libpq5 \
libpq-dev \
libsqlite3-dev \
libcurl4-openssl-dev \
libicu-dev \
libzip-dev \
libonig-dev \
libldap2-dev \
libsmbclient-dev \
libgmp-dev \
&& /configure_gd.sh \
&& docker-php-ext-install gd \
&& docker-php-ext-install iconv zip pdo pdo_pgsql pdo_sqlite pgsql pdo_mysql intl curl mbstring pcntl ldap exif gmp \
&& pecl install inotify \
&& pecl install smbclient \
&& pecl install excimer \
&& apt-get remove -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libpq-dev \
libsqlite3-dev \
libcurl4-openssl-dev \
libicu-dev \
libzip-dev \
libonig-dev \
libldap2-dev \
libsmbclient-dev \
&& rm -rf /var/lib/apt/lists/*
RUN pecl install apcu \
&& pecl install xdebug \
&& pecl install redis \
&& export VERSION=`php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;"` \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/${VERSION} \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \
&& mv /tmp/blackfire-*.so `php -r "echo ini_get('extension_dir');"`/blackfire.so
ARG BASE_IMAGE
RUN sh -c 'if [ "$BASE_IMAGE" = "php" ]; then echo "extension=smbclient.so" > $PHP_INI_DIR/conf.d/smbclient.ini; fi' \
&& sh -c 'if [ "$BASE_IMAGE" = "php" ]; then echo "extension=blackfire.so" > $PHP_INI_DIR/conf.d/blackfire.ini; fi' \
&& echo "extension=excimer.so" > $PHP_INI_DIR/conf.d/excimer.ini \
&& echo "extension=inotify.so" > $PHP_INI_DIR/conf.d/inotify.ini \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > $PHP_INI_DIR/conf.d/xdebug.ini \
&& echo "xdebug.mode=debug,trace,profile" >> $PHP_INI_DIR/conf.d/xdebug.ini \
&& echo "xdebug.start_with_request=trigger" >> $PHP_INI_DIR/conf.d/xdebug.ini \
&& echo "xdebug.discover_client_host=true" >> $PHP_INI_DIR/conf.d/xdebug.ini \
&& echo "xdebug.client_host=hazehost" >> $PHP_INI_DIR/conf.d/xdebug.ini \
&& echo "xdebug.log_level=0" >> $PHP_INI_DIR/conf.d/xdebug.ini \
&& echo "xdebug.output_dir=/tmp/xdebug" >> $PHP_INI_DIR/conf.d/xdebug.ini \
&& echo "memory_limit = 512M" > $PHP_INI_DIR/conf.d/memory_limit.ini \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
ADD install-oci.sh /
RUN /install-oci.sh \
&& echo "extension=oci8.so" > $PHP_INI_DIR/conf.d/oci8.ini
ADD apcu.ini opcache.ini redis.ini $PHP_INI_DIR/conf.d/
ADD nginx.conf nginx-app.conf /etc/nginx/
ADD php-fpm.conf /usr/local/etc/
ADD index.php /var/www/html/
ADD bootstrap-nginx.sh /usr/local/bin/
EXPOSE 80
ENTRYPOINT ["bootstrap-nginx.sh"]

View file

@ -1,2 +0,0 @@
extension=apcu.so
apc.enable_cli = 1

View file

@ -1,27 +0,0 @@
#!/bin/sh
touch /var/log/nginx/access.log
touch /var/log/nginx/error.log
tail --follow --retry /var/log/nginx/*.log &
UID=${UID:-1000}
GID=${GID:-1000}
if [ $(getent group $GID) ]; then
groupadd haze
EXTRA_GROUP=" -G haze"
else
groupadd -g $GID haze
EXTRA_GROUP=""
fi
useradd -u $UID -g $GID $EXTRA_GROUP haze
chown -R haze:$GID /home/haze
if [ -f "/var/run/docker.sock" ]; then
groupadd docker -g $(stat --format "%g" /var/run/docker.sock)
usermod -a -G docker haze
fi
/usr/local/sbin/php-fpm &
nginx

View file

@ -1,19 +0,0 @@
#!/bin/sh
PHP=$(echo "$PHP_VERSION" | cut -c -3)
echo "php $PHP"
if [ "$PHP" = "7.2" ] || [ "$PHP" = "7.3" ]; then
docker-php-ext-configure gd \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-zlib-dir \
--with-freetype-dir
else
docker-php-ext-configure gd \
--enable-gd \
--with-jpeg \
--with-freetype
fi

View file

@ -1,3 +0,0 @@
<?php
echo "hello_world";

View file

@ -1,25 +0,0 @@
#!/bin/sh
PHP=$(echo "$PHP_VERSION" | cut -c -3)
echo "php $PHP"
case $PHP in
"7.4") OCI_VERSION="-2.2.0" ;;
"8.0") OCI_VERSION="-3.0.1" ;;
"8.1") OCI_VERSION="-3.2.1" ;;
*) status=$status ;;
esac
echo "using oci8$OCI_VERSION"
mkdir /opt/oracle
cd /opt/oracle
wget https://download.oracle.com/otn_software/linux/instantclient/2110000/instantclient-basiclite-linux.x64-21.10.0.0.0dbru.zip
wget https://download.oracle.com/otn_software/linux/instantclient/2110000/instantclient-sdk-linux.x64-21.10.0.0.0dbru.zip
unzip instantclient-basiclite-linux.x64-21.10.0.0.0dbru.zip
unzip instantclient-sdk-linux.x64-21.10.0.0.0dbru.zip
rm instantclient*.zip
echo /opt/oracle/instantclient_21_10 > /etc/ld.so.conf.d/oracle-instantclient.conf
ldconfig
pecl install -D 'with-oci8="instantclient,/opt/oracle/instantclient_21_10"' oci8$OCI_VERSION

View file

@ -1 +0,0 @@

View file

@ -1,2 +0,0 @@
zend_extension=opcache.so
opcache.enable_cli=1

View file

@ -1 +0,0 @@
extension=redis.so

View file

@ -1,15 +0,0 @@
#!/usr/bin/env bash
set -e
versions=("8.1" "8.2" "8.0-dbg" "8.1-dbg" "8.2-dbg")
for version in "${versions[@]}"; do
docker push "icewind1991/haze-php:$version"
done
for version in "${versions[@]}"; do
docker push "icewind1991/haze:$version"
done
docker push "icewind1991/haze-ldap"

43
nix/image/bootstrap-nginx.sh Executable file
View file

@ -0,0 +1,43 @@
#!/usr/bin/env bash
NGINX_CONFIG="$1"
FPM_CONFIG="$2"
echo "nginx: $NGINX_CONFIG"
echo "fpm: $FPM_CONFIG"
mkdir -p /var/log/nginx /tmp
touch /var/log/nginx/access.log
touch /var/log/nginx/error.log
tail --follow --retry /var/log/nginx/*.log &
HAZE_UID=${HAZE_UID:-1000}
HAZE_GID=${HAZE_GID:-1000}
# undo the fakeNss symlink
mv /etc/passwd /etc/passwd.bak
cp /etc/passwd.bak /etc/passwd
mv /etc/group /etc/group.bak
cp /etc/group.bak /etc/group
if [ "$(getent group "$HAZE_GID")" ]; then
groupadd haze
EXTRA_GROUP=" -G haze"
else
groupadd -g "$HAZE_GID" haze
EXTRA_GROUP=""
fi
useradd -m -u "$HAZE_UID" -g "$HAZE_GID""$EXTRA_GROUP" haze
chown -R haze:"$HAZE_GID" /home/haze
if [ -f "/var/run/docker.sock" ]; then
groupadd docker -g "$(stat --format "%g" /var/run/docker.sock)"
usermod -a -G docker haze
fi
php-fpm --fpm-config "$FPM_CONFIG" &
nginx -c "$NGINX_CONFIG"

107
nix/image/bootstrap.sh Executable file
View file

@ -0,0 +1,107 @@
#!/usr/bin/env bash
touch /var/log/nginx/access.log
touch /var/log/nginx/error.log
touch /var/log/cron/owncloud.log
cp /etc/nc/config.php /var/www/html/config/config.php
chmod 0755 /var/www/html/config/config.php
if [ "$SQL" = "mysql" ]
then
cp /etc/nc/autoconfig_mysql.php /var/www/html/config/autoconfig.php
fi
if [ "$SQL" = "mariadb" ]
then
cp /etc/nc/autoconfig_mariadb.php /var/www/html/config/autoconfig.php
fi
if [ "$SQL" = "pgsql" ]
then
cp /etc/nc/autoconfig_pgsql.php /var/www/html/config/autoconfig.php
fi
if [ "$SQL" = "oci" ]
then
cp /etc/nc/autoconfig_oci.php /var/www/html/config/autoconfig.php
fi
HAZE_UID=${HAZE_UID:-www-data}
HAZE_GID=${HAZE_GID:-www-data}
echo "Running as $HAZE_UID:$HAZE_GID"
mkdir -p /var/www/html/core/skeleton /var/www/html/build/integration/vendor /var/www/html/build/integration/output /var/www/html/build/integration/work /var/www/html/core/skeleton /var/www/.composer/cache /var/www/html/apps/spreed/tests/integration/vendor/composer
chown -R "$HAZE_UID":"$HAZE_GID" /var/www/html/data /var/www/html/config
chown "$HAZE_UID":"$HAZE_GID" /var/www/html/core/skeleton /var/www/html/build/integration/vendor /var/www/html/build/integration/composer.lock /var/www/html/build/integration/output /var/www/html/build/integration/work /var/www/html/core/skeleton /var/www/.composer/cache /var/www/html/apps/spreed/tests/integration/vendor/composer
echo "{}" > /var/www/html/build/integration/composer.lock
echo "Starting server using $SQL database…"
tail --follow --retry /var/log/nginx/*.log /var/log/cron/owncloud.log &
if [ -n "${S3:-}" ]
then
sed -i '/\/\/PLACEHOLDER/ r /etc/nc/s3.php' /var/www/html/config/config.php
fi
if [ -n "${S3MB:-}" ]
then
sed -i '/\/\/PLACEHOLDER/ r /etc/nc/s3mb.php' /var/www/html/config/config.php
fi
if [ -n "${S3M:-}" ]
then
sed -i '/\/\/PLACEHOLDER/ r /etc/nc/s3m.php' /var/www/html/config/config.php
fi
if [ -n "${SWIFT:-}" ]
then
sed -i '/\/\/PLACEHOLDER/ r /etc/nc/swift.php' /var/www/html/config/config.php
fi
if [ -n "${SWIFTV3:-}" ]
then
sed -i '/\/\/PLACEHOLDER/ r /etc/nc/swiftv3.php' /var/www/html/config/config.php
fi
if [ -n "${AZURE:-}" ]
then
sed -i '/\/\/PLACEHOLDER/ r /etc/nc/azure.php' /var/www/html/config/config.php
fi
if [ -n "${REDIS_TLS:-}" ]
then
sed -i '/\/\/PLACEHOLDER/ r /etc/nc/redis-tls.php' /var/www/html/config/config.php
else
sed -i '/\/\/PLACEHOLDER/ r /etc/nc/redis-default.php' /var/www/html/config/config.php
fi
if [ -n "${BLACKFIRE_SERVER_ID:-}" ]
then
sh -c '
yes | blackfire agent:config --server-id=$BLACKFIRE_SERVER_ID --server-token=$BLACKFIRE_SERVER_TOKEN
mkdir /var/run/blackfire/
BLACKFIRE_LOG_LEVEL=4 BLACKFIRE_LOG_FILE=/var/log/agent.log blackfire agent &
'&
fi
# crontab /etc/oc-cron.conf
# crond -f & # todo
if [ -n "${REDIS_TLS:-}" ]
then
redis-server --protected-mode no \
--tls-port 6379 --port 0 \
--tls-cert-file /redis-certificates/server.crt \
--tls-key-file /redis-certificates/server.key \
--tls-ca-cert-file /redis-certificates/ca.crt &
else
redis-server --protected-mode no &
fi
echo "starting nginx"
bootstrap-nginx "$@"

8
nix/image/configs.nix Normal file
View file

@ -0,0 +1,8 @@
{runCommand}:
runCommand "configs" {} ''
mkdir -p $out/etc
mkdir -p $out/conf
cp ${./configs/cron.conf} $out/etc/oc-cron.conf
cp ${./configs/nginx-app.conf} $out/conf/nginx-app.conf
cp -r ${./configs/nc} $out/etc/nc
''

View file

@ -0,0 +1,10 @@
'objectstore' => [
'class' => 'OC\\Files\\ObjectStore\\Azure',
'arguments' => array(
'container' => 'test',
'account_name' => 'devstoreaccount1',
'account_key' => 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==',
'endpoint' => 'http://azure:10000/devstoreaccount1',
'autocreate' => true
)
],

127
nix/image/haze.nix Normal file
View file

@ -0,0 +1,127 @@
{
lib,
dockerTools,
php,
bash,
nginx,
blackfire,
coreutils,
getent,
shadow,
buildEnv,
runCommand,
cacert,
callPackage,
cronie,
redis,
gnused,
samba,
wget,
git,
procps,
gnugrep,
minio-client,
neovim,
helix,
debug ? false,
writeShellApplication,
}: let
inherit (lib) readFile getExe;
phpVersion = lib.concatStringsSep "." (lib.take 2 (lib.splitString "." php.version));
phpEnv = callPackage ./php.nix {inherit debug php;};
bootstrap-nginx = writeShellApplication {
name = "bootstrap-nginx";
text = readFile ./bootstrap-nginx.sh;
};
bootstrap = writeShellApplication {
name = "bootstrap";
runtimeInputs = [getent];
text = readFile ./bootstrap.sh;
};
tmpDir = runCommand "tmp-dir" {} ''
mkdir -p $out/tmp
mkdir -p $out/var/cache/nginx
mkdir -p $out/var/log/nginx
mkdir -p $out/var/log/cron
mkdir -p $out/var/www/html
mkdir -p $out/var/run
mkdir -p $out/var/tmp
mkdir -p $out/run
mkdir -p $out/conf
mkdir -p $out/var/spool
'';
configs = callPackage ./configs.nix {};
scripts = callPackage ./scripts.nix {};
redis-certificates = runCommand "scripts" {} ''
mkdir -p $out
cp -r ${../../redis-certificates} $out/redis-certificates
'';
baseImage = dockerTools.buildImage {
name = "icewind1991/haze-base";
tag = phpVersion;
copyToRoot = [
cacert
dockerTools.usrBinEnv
dockerTools.fakeNss
bash
blackfire
nginx
coreutils
shadow
cronie
redis
gnused
procps
gnugrep
minio-client
# samba
wget
neovim
helix
];
};
phpImage = dockerTools.buildImage {
name = "icewind1991/haze-php";
tag = phpVersion;
fromImage = baseImage;
copyToRoot = [
phpEnv
phpEnv.packages.composer
];
};
in
dockerTools.buildLayeredImage {
name = "icewind1991/haze";
tag = phpVersion;
maxLayers = 5;
fromImage = phpImage;
contents = [
tmpDir
bootstrap-nginx
bootstrap
configs
scripts
redis-certificates
];
fakeRootCommands = ''
chmod 1777 tmp
chmod 1777 var/tmp
chmod 1777 var/run
chmod 1777 var/log/nginx
chmod 1777 var/cache/nginx
chmod 1777 var/spool
chmod -R 0755 etc/nc
'';
config = {
Cmd = [(getExe bootstrap) ./nginx.conf ./php-fpm.conf];
Env = ["EDITOR=hx" "WEBROOT=/var/www/html"];
WorkingDir = "/var/www/html";
};
}

View file

@ -23,7 +23,7 @@ http {
# server_names_hash_bucket_size 64; # server_names_hash_bucket_size 64;
# server_name_in_redirect off; # server_name_in_redirect off;
include /etc/nginx/mime.types; include /conf/mime.types;
types { types {
application/javascript mjs; application/javascript mjs;
} }
@ -48,7 +48,7 @@ http {
server_tokens off; server_tokens off;
upstream php-handler { upstream php-handler {
server unix:/var/run/php5-fpm.sock; server unix:/var/run/php-fpm.sock;
} }
server { server {
@ -69,13 +69,13 @@ http {
access_log off; access_log off;
} }
include nginx-app.conf; include /conf/nginx-app.conf;
location ~ \.php(?:$|/) { location ~ \.php(?:$|/) {
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri; rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params; include /conf/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass php-handler; fastcgi_pass php-handler;

View file

@ -1,6 +1,3 @@
; This file was initially adapated from the output of: (on PHP 5.6)
; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default
[global] [global]
error_log = /proc/self/fd/2 error_log = /proc/self/fd/2
@ -8,13 +5,12 @@ daemonize = no
[www] [www]
; if we send this to /proc/self/fd/1, it never appears
access.log = /proc/self/fd/2 access.log = /proc/self/fd/2
user = haze user = haze
group = haze group = haze
listen = /var/run/php5-fpm.sock listen = /var/run/php-fpm.sock
listen.owner = haze listen.owner = haze
listen.group = haze listen.group = haze

53
nix/image/php.nix Normal file
View file

@ -0,0 +1,53 @@
{
lib,
php,
debug ? false,
}: let
inherit (lib) optionals;
in
php.buildEnv {
extensions = {
enabled,
all,
}:
enabled
++ (with all;
[
xdebug
excimer
inotify
redis
oci8
zip
pdo
pdo_pgsql
pdo_sqlite
pdo_mysql
pgsql
intl
curl
mbstring
pcntl
ldap
exif
gmp
apcu
]
++ optionals (!debug) [
# smbclient # this breaks the build for no apparent reason
blackfire
]);
extraConfig = ''
xdebug.mode=debug,trace,profile
xdebug.start_with_request=trigger
xdebug.discover_client_host=true
xdebug.client_host=hazehost
xdebug.log_level=0
xdebug.output_dir=/tmp/xdebug
memory_limit=512M
apc.enable_cli=1
opcache.enable_cli=1
'';
}

5
nix/image/scripts.nix Normal file
View file

@ -0,0 +1,5 @@
{runCommand}:
runCommand "scripts" {} ''
mkdir -p $out
cp -r ${./scripts} $out/bin
''

View file

@ -1,3 +1,7 @@
final: prev: { final: prev: {
haze = final.callPackage ./package.nix {}; haze = final.callPackage ./package.nix {};
haze-image-php-84 = final.callPackage ./image/haze.nix {php = final.php84;};
haze-image-php-83 = final.callPackage ./image/haze.nix {php = final.php83;};
haze-image-php-82 = final.callPackage ./image/haze.nix {php = final.php82;};
haze-image-php-81 = final.callPackage ./image/haze.nix {php = final.php81;};
} }

View file

@ -282,8 +282,8 @@ impl Cloud {
let mut env = vec![ let mut env = vec![
"PHP_IDE_CONFIG=serverName=haze".to_string(), "PHP_IDE_CONFIG=serverName=haze".to_string(),
"CHROMIUM_BIN=/usr/local/bin/chromium-no-sandbox".to_string(), "CHROMIUM_BIN=/usr/local/bin/chromium-no-sandbox".to_string(),
format!("UID={}", uid), format!("HAZE_UID={}", uid),
format!("GID={}", gid), format!("HAZE_GID={}", gid),
format!("SQL={}", options.db.name()), format!("SQL={}", options.db.name()),
]; ];
let volumes: Vec<String> = mappings let volumes: Vec<String> = mappings