Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: "Docker"

on:
workflow_dispatch:

push:
branches: ["master"]

pull_request:

permissions:
contents: read

jobs:
test:
name: "Test"
runs-on: "ubuntu-latest"

steps:
- name: "Checkout"
uses: actions/checkout@v4

- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v3

- name: "Build images"
run: "make build"

- name: "Test images"
run: "make test"

build:
name: "Build"
runs-on: "ubuntu-latest"
needs: ["test"]

steps:
- name: "Checkout"
uses: actions/checkout@v4

- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v3

- name: "Build web image"
uses: docker/build-push-action@v6
with:
context: "."
file: "web/Dockerfile"
push: false
tags: "drupalista/web:latest"

- name: "Build Redis image"
uses: docker/build-push-action@v6
with:
context: "."
file: "redis/Dockerfile"
push: false
tags: "drupalista/redis:latest"
33 changes: 33 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# AGENTS.md

## Project

Dockette Drupalista is a legacy Dockerized Drupal stack. It builds two local images, `drupalista/web:latest` and `drupalista/redis:latest`, and runs them with PostgreSQL and Adminer through Docker Compose.

## Images

- Web image: `drupalista/web:latest` from `web/Dockerfile`.
- Redis image: `drupalista/redis:latest` from `redis/Dockerfile`.
- The web image is based on `thecodingmachine/php:7.4-v3-slim-apache`; treat PHP 7.4 and the listed extensions as legacy constraints.
- The Redis image is based on `redis:5` and adds `redis/redis.conf` for the Unix socket setup used by the Drupal stack.

## Commands

- `make build` builds both local images.
- `make test` validates the compose file and runs non-interactive PHP/Redis version smoke checks against the built images.
- `make run` starts the compose stack locally.
- `make -n build test run` dry-runs the command wiring without requiring Docker.

## Testing Notes

- Run `docker compose config` after compose changes.
- Run `make test` after Dockerfile, Makefile, or compose changes when Docker is available.
- The smoke tests expect `make build` to have built the local images first.

## Guidelines

- Keep the legacy Drupal constraints documented; do not modernize PHP, Redis, PostgreSQL, or image names unless the task explicitly requires it.
- Prefer `DOCKER_*` Makefile variable names for Docker images and clear direct names for compose variables.
- Place `.PHONY: <target>` directly above every Makefile target.
- Do not add Slack badges.
- Avoid publishing a `dockette/drupalista` image unless the repository is changed to build that image intentionally.
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@AGENTS.md
29 changes: 25 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
.PHONY: build
DOCKER_WEB_IMAGE?=drupalista/web
DOCKER_REDIS_IMAGE?=drupalista/redis
DOCKER_TAG?=latest
COMPOSE_FILE?=docker-compose.yml

.PHONY: build
build: build-web build-redis

.PHONY: build-web
build-web:
docker build -t drupalista/web -f web/Dockerfile .
docker build -t ${DOCKER_WEB_IMAGE}:${DOCKER_TAG} -f web/Dockerfile .

.PHONY: test
test:
docker compose -f ${COMPOSE_FILE} config
docker run --rm ${DOCKER_WEB_IMAGE}:${DOCKER_TAG} php -v
docker run --rm ${DOCKER_REDIS_IMAGE}:${DOCKER_TAG} redis-server --version

.PHONY: test-web
test-web:
docker run -it --rm drupalista/web bash
docker run --rm ${DOCKER_WEB_IMAGE}:${DOCKER_TAG} php -v

.PHONY: build-redis
build-redis:
docker build -t drupalista/redis -f redis/Dockerfile .
docker build -t ${DOCKER_REDIS_IMAGE}:${DOCKER_TAG} -f redis/Dockerfile .

.PHONY: test-redis
test-redis:
docker run --rm ${DOCKER_REDIS_IMAGE}:${DOCKER_TAG} redis-server --version

.PHONY: run
run:
docker compose -f ${COMPOSE_FILE} up
70 changes: 17 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<h1 align=center>Dockette / Drupalista</h1>

<p align=center>
🐳 Dockerized Drupal Stack
<a href="https://github.com/dockette/drupalista/actions"><img src="https://github.com/dockette/drupalista/actions/workflows/docker.yml/badge.svg" alt="GitHub Actions"></a>
<a href="https://github.com/sponsors/f3l1x"><img src="https://img.shields.io/badge/sponsor-GitHub%20Sponsors-ea4aaa" alt="GitHub Sponsors"></a>
<a href="https://github.com/orgs/dockette/discussions"><img src="https://img.shields.io/badge/support-discussions-6f42c1" alt="Support/Discussions"></a>
</p>

<p align=center>
🐳 Dockerized Drupal Stack
</p>

<p align=center>
Expand All @@ -12,68 +18,26 @@

## Usage

This is a legacy Drupal stack. The baseline intentionally keeps PHP 7.4, Redis 5 and PostgreSQL 12 aligned with the original runtime instead of modernizing the application stack.

This stack is composed from these images:

- `drupalista/web`
- Based on `thecodingmachine/php:7.4-v3-slim-apache`
- PHP: amqp, apcu, ast, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, ds, enchant, ev, event, exif, fileinfo, filter, ftp, gd, gettext, gmp, gnupg, hash, iconv, igbinary, imagick, imap, intl, json, ldap, libxml, mailparse, mbstring, memcached, mongodb, msgpack, mysqli, mysqlnd, openssl, pcntl, pcov, pcre, PDO, pdo_dblib, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, uuid, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib, Xdebug, Zend OPcache, blackfire
- PHP: apcu, ast, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, ds, enchant, ev, event, exif, fileinfo, filter, ftp, gd, gettext, gmp, gnupg, hash, iconv, igbinary, imagick, imap, intl, json, ldap, libxml, mailparse, mbstring, memcached, mongodb, msgpack, mysqli, mysqlnd, openssl, pcntl, pcov, pcre, PDO, pdo_dblib, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, uuid, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib, Xdebug, Zend OPcache, blackfire
- Workdir `/srv`
- `drupalista/redis`
- Based on `redis:5`
- Update using unix socket

```yaml
version: '3.6'

services:
web:
image: drupalista/web
restart: unless-stopped
ports:
- 8000:80
environment:
- STARTUP_COMMAND_1=composer install
volumes:
- ./:/srv:cached
- ./.data/redis:/tmp/docker:cached

postgresql:
image: postgres:12
restart: unless-stopped
ports:
- 5432:5432
environment:
- POSTGRES_PASSWORD=drupal
- POSTGRES_USER=drupal
- POSTGRES_DB=drupal
volumes:
- ./.data/postgres:/var/lib/postgresql/data

adminer:
image: dockette/adminer:dg
restart: unless-stopped
ports:
- 8010:80

redis:
image: drupalista/redis
restart: unless-stopped
ports:
- 6379:6379
volumes:
- ./.data/redis:/tmp/docker:cached
```bash
make build
make test
make run
```

## Development

See [how to contribute](https://contributte.org/contributing.html) to this package.
The checked-in `docker-compose.yml` exposes the web application on `8000`, Adminer on `8010`, PostgreSQL on `5432` and Redis on `6379`.

This package is currently maintaining by these authors.

<a href="https://github.com/f3l1x">
<img width="80" height="80" src="https://avatars2.githubusercontent.com/u/538058?v=3&s=80">
</a>

-----
## Maintenance

Consider to [support](https://github.com/sponsors/f3l1x) **f3l1x**. Also thank you for using this package.
See [how to contribute](https://github.com/dockette/.github/blob/master/CONTRIBUTING.md) to this package. Consider to [support](https://github.com/sponsors/f3l1x) **f3l1x**. Thank you for using this package.
43 changes: 43 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
services:
web:
image: drupalista/web:latest
build:
context: .
dockerfile: web/Dockerfile
restart: unless-stopped
ports:
- "8000:80"
environment:
STARTUP_COMMAND_1: composer install
volumes:
- ./:/srv:cached
- ./.data/redis:/tmp/docker:cached

postgresql:
image: postgres:12
restart: unless-stopped
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: drupal
POSTGRES_USER: drupal
POSTGRES_DB: drupal
volumes:
- ./.data/postgres:/var/lib/postgresql/data

adminer:
image: dockette/adminer:dg
restart: unless-stopped
ports:
- "8010:80"

redis:
image: drupalista/redis:latest
build:
context: .
dockerfile: redis/Dockerfile
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- ./.data/redis:/tmp/docker:cached
1 change: 0 additions & 1 deletion web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG PHP_EXTENSIONS="\
amqp \
apcu \
ast \
bcmath \
Expand Down
Loading