Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
working-directory: /var/www/app

- name: Copy required content
run: sudo cp -R FrankenPHP.Dockerfile docker-compose.production.yml Makefile .env.production .dockerignore deployment/ /var/www/app/
run: sudo cp -R FrankenPHP.Dockerfile compose.production.yaml Makefile .env.production .dockerignore deployment/ /var/www/app/

- name: Prepare the environment
run: sudo mkdir -p storage/framework/{sessions,views,cache,testing} storage/logs && sudo chmod -R a+rw storage
Expand Down
4 changes: 1 addition & 3 deletions FrankenPHP.Alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ ARG WWWGROUP=1000
ARG TZ=UTC
ARG APP_DIR=/var/www/html
ARG APP_ENV
ARG APP_HOST

ENV TERM=xterm-color \
OCTANE_SERVER=frankenphp \
Expand All @@ -47,8 +46,7 @@ ENV TERM=xterm-color \
COMPOSER_FUND=0 \
COMPOSER_MAX_PARALLEL_HTTP=24 \
XDG_CONFIG_HOME=${APP_DIR}/.config \
XDG_DATA_HOME=${APP_DIR}/.data \
SERVER_NAME=${APP_HOST}
XDG_DATA_HOME=${APP_DIR}/.data

WORKDIR ${ROOT}

Expand Down
4 changes: 1 addition & 3 deletions FrankenPHP.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ ARG WWWGROUP=1000
ARG TZ=UTC
ARG APP_DIR=/var/www/html
ARG APP_ENV
ARG APP_HOST

ENV DEBIAN_FRONTEND=noninteractive \
TERM=xterm-color \
Expand All @@ -48,8 +47,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
COMPOSER_FUND=0 \
COMPOSER_MAX_PARALLEL_HTTP=24 \
XDG_CONFIG_HOME=${APP_DIR}/.config \
XDG_DATA_HOME=${APP_DIR}/.data \
SERVER_NAME=${APP_HOST}
XDG_DATA_HOME=${APP_DIR}/.data

WORKDIR ${ROOT}

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile readme (en): <https://www.gnu.org/software/make/manual/html_node/index.html#SEC_Contents>

SHELL = /bin/bash
DC_RUN_ARGS = --env-file ./.env.production --profile app --profile administration -f docker-compose.production.yml
DC_RUN_ARGS = --env-file ./.env.production --profile app --profile administration -f compose.production.yaml
HOST_UID=$(shell id -u)
HOST_GID=$(shell id -g)

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<a href="https://github.com/exaco/laravel-octane-dockerfile/actions/workflows/tests.yml"><img alt="GitHub Workflow Status" src="https://github.com/exaco/laravel-octane-dockerfile/actions/workflows/roadrunner-test.yml/badge.svg"></a>
<a href="https://github.com/exaco/laravel-octane-dockerfile/actions/workflows/tests.yml"><img alt="GitHub Workflow Status" src="https://github.com/exaco/laravel-octane-dockerfile/actions/workflows/swoole-test.yml/badge.svg"></a>
<a href="https://github.com/exaco/laravel-octane-dockerfile/actions/workflows/tests.yml"><img alt="GitHub Workflow Status" src="https://github.com/exaco/laravel-octane-dockerfile/actions/workflows/frankenphp-test.yml/badge.svg"></a>
<a href="https://github.com/exaco/laravel-octane-dockerfile/actions/workflows/tests.yml"><img alt="GitHub Workflow Status" src="https://github.com/exaco/laravel-octane-dockerfile/actions/workflows/docker-compose-test.yml/badge.svg"></a>
<a href="https://github.com/exaco/laravel-octane-dockerfile/actions/workflows/tests.yml"><img alt="GitHub Workflow Status" src="https://github.com/exaco/laravel-octane-dockerfile/actions/workflows/compose-test.yaml/badge.svg"></a>
</div>
<br>

Expand All @@ -24,7 +24,7 @@ The setup is optimized for performance and includes multi-stage builds to create
- **Multi-Stage Builds:** Creates smaller, more secure Docker images by separating build dependencies from the final runtime image.
- **Container Modes:** Easily run your container in different modes for handling web requests (`http`), queues (`horizon`), scheduled tasks (`scheduler`), custom worker (`worker`), or WebSocket server (`reverb`).
- **Extensible:** Simple to customize for your specific application needs.
- **Comprehensive Docker Compose:** Includes a production-ready `docker-compose.production.yml` to orchestrate the full application stack.
- **Comprehensive Docker Compose:** Includes a production-ready `compose.production.yaml` to orchestrate the full application stack.


## Laravel Container modes
Expand All @@ -42,7 +42,7 @@ Easily launch your container in different modes to handle specific tasks:

## Production-Ready Docker Compose

For a complete production environment, this repository includes a `docker-compose.production.yml` file to orchestrate a full stack of services. This setup is security-hardened and provides a comprehensive solution for deploying and managing your application.
For a complete production environment, this repository includes a `compose.production.yaml` file to orchestrate a full stack of services. This setup is security-hardened and provides a comprehensive solution for deploying and managing your application.

The orchestrated containers include:

Expand Down Expand Up @@ -137,7 +137,7 @@ docker run --rm <image-name>:<tag> php artisan about

To deploy your application stack with Docker Compose:
1. Copy the following items to your code base:
- `docker-compose.production.yml`
- `compose.production.yaml`
- `.env.production`
- `Makefile`
2. Edit `.env.production` and populate it with the appropriate values for your production environment variables (e.g., database credentials, API keys).
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.production.yml → compose.production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ x-base: &base
- 'laravel/app:latest'
args:
APP_ENV: 'production' # to load .env.production
APP_HOST: '${APP_HOST}'
WWWUSER: ${HOST_UID:-1000}
WWWGROUP: ${HOST_GID:-1000}
image: 'laravel/app:latest'
Expand Down Expand Up @@ -238,7 +237,7 @@ services:
docker-volume-backup.stop-during-backup: true
docker-volume-backup.archive-pre: /bin/sh -c 'pg_dump -U ${DB_USERNAME} -F t ${DB_DATABASE} > /backup/${DB_DATABASE}-database.tar'
pgbouncer:
image: bitnami/pgbouncer:1
image: bitnamilegacy/pgbouncer:latest
restart: unless-stopped
logging: *default-logging
depends_on:
Expand Down
4 changes: 1 addition & 3 deletions static-build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ ARG WWWGROUP=1000
ARG TZ=UTC
ARG APP_DIR=/var/www/html
ARG APP_ENV
ARG APP_HOST

ENV DEBIAN_FRONTEND=noninteractive \
TERM=xterm-color \
Expand All @@ -48,8 +47,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
COMPOSER_FUND=0 \
COMPOSER_MAX_PARALLEL_HTTP=24 \
XDG_CONFIG_HOME=${APP_DIR}/.config \
XDG_DATA_HOME=${APP_DIR}/.data \
SERVER_NAME=${APP_HOST}
XDG_DATA_HOME=${APP_DIR}/.data

WORKDIR ${ROOT}

Expand Down