Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple docker dev environment #1422

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from
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
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ APP_DEBUG=false
APP_URL=http://localhost

LOG_CHANNEL=daily
# LOG_CHANNEL=stderr # docker development

DB_CONNECTION=sqlite
DB_DATABASE=app.sqlite
Expand Down
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM php:8.3

RUN apt-get update && apt-get install -y --no-install-recommends \
libzip-dev \
libicu-dev \
libpq-dev \
libsqlite3-dev \
libcurl4-openssl-dev \
libxml2-dev \
zip \
unzip \
curl \
pkg-config \
&& docker-php-ext-configure zip \
&& docker-php-ext-install \
dom \
intl \
pdo_pgsql \
pdo_sqlite \
pdo_mysql \
opcache \
zip \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

RUN curl -sS https://getcomposer.org/installer -o composer-setup.php \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer

WORKDIR /app

CMD php artisan serve --host 0.0.0.0
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
services:
heimdall:
build:
context: .
dockerfile: Dockerfile
env_file: .env
volumes:
- .:/app
ports:
- 8000:8000
restart: unless-stopped
Loading