Skip to content

Commit 7ab2cd9

Browse files
committed
Merge branch 'v2.x' of https://github.com/leafsphp/cli into v2.x
2 parents c987578 + a127544 commit 7ab2cd9

File tree

6 files changed

+63
-2
lines changed

6 files changed

+63
-2
lines changed

src/CreateCommand.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int
181181

182182
if ($process->isSuccessful()) {
183183
if ($this->getAppDockPreset($input, $output)) {
184-
FS::superCopy(__DIR__ . '/themes/docker', $directory);
184+
$dockerThemeFolder = __DIR__ . '/themes/docker';
185+
186+
if ($preset === 'mvc' || $preset === 'api') {
187+
$dockerThemeFolder = __DIR__ . '/themes/mvc/docker';
188+
}
189+
190+
FS::superCopy($dockerThemeFolder, $directory);
185191
$output->write("\n🚀 Docker environment scaffolded successfully");
186192
}
187193

src/themes/docker/docker/000-default.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
DocumentRoot /var/www
44

55
<Directory /var/www>
6-
Options Indexes FollowSymLinks
6+
Options FollowSymLinks
77
AllowOverride All
88
Require all granted
99
</Directory>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: '3.1'
2+
services:
3+
application:
4+
build: ./docker
5+
image: leafphp/docker
6+
ports:
7+
- '8080:80'
8+
volumes:
9+
- .:/var/www
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<VirtualHost *:80>
2+
ServerAdmin webmaster@localhost
3+
ServerName localhost
4+
DocumentRoot /var/www/public
5+
6+
<Directory /var/www/public>
7+
Options FollowSymLinks
8+
AllowOverride All
9+
Require all granted
10+
</Directory>
11+
</VirtualHost>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM php:8.1-apache
2+
3+
COPY 000-default.conf /etc/apache2/sites-available/000-default.conf
4+
5+
RUN a2enmod rewrite
6+
7+
RUN apt-get update && apt-get install -y --no-install-recommends \
8+
libzip-dev \
9+
wget \
10+
git \
11+
unzip
12+
13+
RUN docker-php-ext-install zip pdo pdo_mysql
14+
15+
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
16+
17+
RUN composer global require leafs/cli
18+
19+
RUN ln -s /root/.composer/vendor/bin/leaf /usr/local/bin/leaf
20+
21+
COPY ./php.ini /usr/local/etc/php/php.ini
22+
23+
RUN apt-get purge -y g++ \
24+
&& apt-get autoremove -y \
25+
&& rm -rf /var/lib/apt/lists/* \
26+
&& rm -rf /tmp/*
27+
28+
WORKDIR /var/www
29+
30+
RUN chown -R www-data:www-data /var/www
31+
32+
CMD ["apache2-foreground"]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
; General
2+
upload_max_filesize = 200M
3+
post_max_size = 220M

0 commit comments

Comments
 (0)