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
10 changes: 5 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

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

- name: "Validate compose and scripts"
run: "make test"
Expand All @@ -33,12 +33,12 @@ jobs:

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

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

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

docs:
Expand All @@ -49,7 +49,7 @@ jobs:

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

- name: "Update Docker Hub description"
uses: peter-evans/dockerhub-description@v5
Expand Down
11 changes: 6 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@

## Project

Dockette DevStack is a legacy Docker Compose LAMP development stack. It combines Apache, PHP FPM, Node.js, Adminer, MariaDB, optional PostgreSQL, and user data helper containers through `docker-compose.yml` and the `devstack` control script.
Dockette DevStack is a Docker Compose LAMP development stack. It combines Apache, PHP FPM, Node.js, Adminer, MariaDB, optional PostgreSQL, and user data helper containers through `docker-compose.yml` and the `devstack` control script.

## Images

- Docker Hub repository: `dockette/devstack`.
- Local image contexts live in `apache/`, `nodejs/`, and `php/*`.
- The default compose file references tags such as `dockette/devstack:apache`, `dockette/devstack:php72-fpm`, and `dockette/devstack:nodejs`.
- Base images and runtime versions are legacy; avoid broad upgrades unless explicitly requested.
- The default compose file references tags such as `dockette/devstack:apache`, `dockette/devstack:php85-fpm`, and `dockette/devstack:nodejs`.
- All images build on `dockette/debian:bookworm`. PHP comes from `packages.sury.org`, Node.js from the official `nodejs.org` tarball, and the Blackfire probe from `packages.blackfire.io`.
- Keep runtimes on current upstream versions; when bumping PHP, update `php/*` directory names, the `PHP_VERSION` env, the FPM `CMD`, the `Makefile` tag, and the compose service name together.

## Commands

- `make build` builds selected representative local images: Apache, PHP 7.2 FPM, and Node.js.
- `make build` builds selected representative local images: Apache, PHP 8.5 FPM, and Node.js.
- `make test` validates `docker-compose.yml` with `docker compose config` and checks `devstack` shell syntax.
- `make run` starts the compose stack with `docker compose up -d --remove-orphans`.

Expand All @@ -25,7 +26,7 @@ Dockette DevStack is a legacy Docker Compose LAMP development stack. It combines

## Guidelines

- Preserve the legacy compose UX and documented service names unless the task explicitly asks for migration.
- Preserve the compose UX and documented service names unless the task explicitly asks for migration.
- Prefer small CI checks: compose config, shell syntax, and representative image builds.
- Place `.PHONY` directly above every Makefile target.
- Keep README badges in the Dockette `copybara` style and do not add Slack or Gitter badges.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ COMPOSE_SSH_AUTH_SOCK?=/tmp/devstack-ssh-agent
.PHONY: build
build:
docker buildx build --platform ${DOCKER_PLATFORMS} -t ${DOCKER_IMAGE}:apache apache
docker buildx build --platform ${DOCKER_PLATFORMS} -t ${DOCKER_IMAGE}:php72-fpm php/7.2-fpm
docker buildx build --platform ${DOCKER_PLATFORMS} -t ${DOCKER_IMAGE}:php85-fpm php/8.5-fpm
docker buildx build --platform ${DOCKER_PLATFORMS} -t ${DOCKER_IMAGE}:nodejs nodejs

.PHONY: test
Expand Down
42 changes: 16 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ Great LAMP devstack based on **Docker** & **Docker Compose** for your home progr
## LAMP

- Apache 2.4.x
- PHP 7.2.x + Composer + PHPMailer
- MariaDB 10.1
- Adminer 4.3.x
- PHP 8.5.x + Composer + PHPMailer
- MariaDB 12.3
- Adminer (see [dockette/adminer](https://github.com/dockette/adminer))

Optional services are prepared in `docker-compose.yml`, but are commented out until you enable them:

- PHP 5.6.x + Composer + PHPMailer
- NodeJS 8.x + NPM 5.x
- PostgreSQL 9.6
- NodeJS 24.x (latest LTS) + NPM
- PostgreSQL 18

## Install

Expand Down Expand Up @@ -61,8 +60,7 @@ Optional services are prepared in `docker-compose.yml`, but are commented out un
| Container | Ports | IP |
|--------------------------|----------|--------------|
| Apache | 80 / 443 | 172.10.10.5 |
| PHP 7.2 + FPM | | 172.10.10.10 |
| PHP 5.6 + FPM (optional) | | 172.10.10.11 |
| PHP 8.5 + FPM | | 172.10.10.10 |
| NodeJS (optional) | | 172.10.10.12 |
| Adminer | 8000 | 172.10.10.13 |
| MariaDB | 3306 | 172.10.10.20 |
Expand All @@ -81,17 +79,17 @@ If you didn't change the `DEVSTACK_DOCKER` variable, you should place your `dock
After you've followed install section, your devstack should be well prepared. One thing left, you should configure your devstack (passwords, folders, etc).

You should:
- setup your [**data homeland**](https://github.com/dockette/devstack/blob/master/docker-compose.yml#L151-L153)
- setup MySQL [**root password**](https://github.com/dockette/devstack/blob/master/docker-compose.yml#L125-L127)
- setup PostgreSQL [**root password**](https://github.com/dockette/devstack/blob/master/docker-compose.yml#L144-L146) if you enable PostgreSQL
- setup your [**data homeland**](https://github.com/dockette/devstack/blob/master/docker-compose.yml#L130-L131)
- setup MySQL [**root password**](https://github.com/dockette/devstack/blob/master/docker-compose.yml#L104-L105)
- setup PostgreSQL [**root password**](https://github.com/dockette/devstack/blob/master/docker-compose.yml#L123-L124) if you enable PostgreSQL

### Userdirs

There are two kind of users inside these containers, **root** (main unix user) and **dfx** (special user with uid 1000 in all `dockette` based images).

You can find it in docker-compose.yml [file in section/container](https://github.com/dockette/devstack/blob/master/docker-compose.yml#L155-L166).
You can find it in docker-compose.yml [file in section/container](https://github.com/dockette/devstack/blob/master/docker-compose.yml#L134-L144).

On the containers startup, your `users dir` are attached to `php72` and to `php56`/`nodejs` when you enable those optional containers. You can create your own `.bash_profile`, `.bashrc` files
On the containers startup, your `users dir` are attached to `php85` and to `nodejs` when you enable that optional container. You can create your own `.bash_profile`, `.bashrc` files
for easier manipulation inside docker containers.

[**TIP**] There used to be a skeleton in ubuntu/debian/mint system.
Expand Down Expand Up @@ -156,24 +154,17 @@ By default is devstack available on domains:
- localhost (php)
- local.dev (php)
- www.local.dev (php)
- local.dev7 (php7)
- www.local.dev7 (php7)

When you enable PHP 5.6, these domains are available too:

- local.dev56 (php56)
- www.local.dev56 (php56)
- local.dev8 (php8)
- www.local.dev8 (php8)

You should add these lines to your `/etc/hosts` file.

```
# Devstack [webserver]
127.0.0.1 local.dev
127.0.0.1 www.local.dev
127.0.0.1 local.dev7
127.0.0.1 www.local.dev7
127.0.0.1 local.dev56
127.0.0.1 www.local.dev56
127.0.0.1 local.dev8
127.0.0.1 www.local.dev8

# Devstack [DB]
172.10.10.20 mariadb
Expand All @@ -185,11 +176,10 @@ Give a try!

```
ping local.dev
ping local.dev7
ping local.dev8
ping mariadb

# Optional services
ping local.dev56
ping postgresql
```

Expand Down
18 changes: 9 additions & 9 deletions apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM dockette/stretch
FROM dockette/debian:bookworm

MAINTAINER Milan Sulc <sulcmil@gmail.com>
LABEL maintainer="Milan Sulc <sulcmil@gmail.com>"

ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_RUN_USER=www-data
ENV APACHE_RUN_GROUP=www-data
ENV APACHE_LOG_DIR=/var/log/apache2
ENV APACHE_LOCK_DIR=/var/lock/apache2
ENV APACHE_PID_FILE=/var/run/apache2.pid

RUN apt-get update && apt-get dist-upgrade -y && \
apt-get install -y vim && \
Expand All @@ -18,8 +18,8 @@ RUN apt-get update && apt-get dist-upgrade -y && \
apt-get clean -y && apt-get autoclean -y && apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* /var/lib/log/* /tmp/* /var/tmp/*

ADD sites /etc/apache2/sites-enabled
ADD conf/devstack.conf /etc/apache2/conf-enabled/999-devstack.conf
COPY sites /etc/apache2/sites-enabled
COPY conf/devstack.conf /etc/apache2/conf-enabled/999-devstack.conf

WORKDIR /srv

Expand Down
16 changes: 0 additions & 16 deletions apache/sites/local-dev56.conf

This file was deleted.

4 changes: 2 additions & 2 deletions apache/sites/local-dev7.conf → apache/sites/local-dev8.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<VirtualHost *:80>
ServerName local.dev7:80
ServerName local.dev8:80
ServerAdmin admin@jfx.cz

<Directory "/srv">
Expand All @@ -11,6 +11,6 @@
</Directory>

<FilesMatch \.php$>
SetHandler "proxy:fcgi://php7:9000"
SetHandler "proxy:fcgi://php8:9000"
</FilesMatch>
</VirtualHost>
34 changes: 6 additions & 28 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '2'

services:
apache:
image: dockette/devstack:apache
Expand All @@ -19,12 +17,11 @@ services:
# - 10443:443

links:
- php72:php
- php72:php7
# - php56:php56
- php85:php
- php85:php8

php72:
image: dockette/devstack:php72-fpm
php85:
image: dockette/devstack:php85-fpm

networks:
default:
Expand All @@ -43,25 +40,6 @@ services:
# - postgresql:postgresql
# - blackfire:blackfire

# php56:
# image: dockette/devstack:php56-fpm

# networks:
# default:
# ipv4_address: 172.10.10.11

# environment:
# - SSH_AUTH_SOCK=/ssh-agent

# volumes_from:
# - data
# - userdirs

# links:
# - mariadb:mysql
# - postgresql:postgresql
# - blackfire:blackfire

# nodejs:
# image: dockette/devstack:nodejs

Expand Down Expand Up @@ -108,7 +86,7 @@ services:
# - postgresql:postgresql

mariadb:
image: mariadb:10.1
image: mariadb:12.3

networks:
default:
Expand All @@ -127,7 +105,7 @@ services:
- MYSQL_ROOT_PASSWORD=root

# postgresql:
# image: postgres:9.6
# image: postgres:18

# networks:
# default:
Expand Down
16 changes: 10 additions & 6 deletions nodejs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
FROM dockette/stretch
FROM dockette/debian:bookworm

MAINTAINER Milan Sulc <sulcmil@gmail.com>
LABEL maintainer="Milan Sulc <sulcmil@gmail.com>"

# NODEJS (latest LTS)
ENV NODE_VERSION=24.19.0

RUN apt-get update && apt-get dist-upgrade -y && \
apt-get install -y wget curl git bash-completion gnupg2 && \
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
apt-get install -y nodejs && \
apt-get install -y wget curl git bash-completion gnupg2 openssh-client && \
curl -fsSLo /tmp/node.tar.gz "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz" && \
tar -xzf /tmp/node.tar.gz -C /usr/local --strip-components=1 --no-same-owner && \
rm /tmp/node.tar.gz /usr/local/CHANGELOG.md /usr/local/LICENSE /usr/local/README.md && \
npm completion >> /etc/bash_completion.d/npm && \
npm install -g gulp bower grunt && \
npm install -g gulp-cli grunt-cli && \
apt-get remove -y curl && \
apt-get clean -y && apt-get autoclean -y && apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* /var/lib/log/* /tmp/* /var/tmp/*
Expand Down
Loading