File tree 5 files changed +11
-21
lines changed
5 files changed +11
-21
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ DB_PASSWORD=password
32
32
```
33
33
34
34
- step 5: change other env variable if you need and run ` docker compose up -d `
35
- - step 6: run ` docker compose exec -it -u 1000 composer composer install --ignore-platform-reqs `
35
+ - step 6: run ` docker compose exec -it -u 1000 laravel composer install `
36
36
- step 7: run ` docker compose exec -it -u 1000 laravel php artisan key:generate `
37
37
- step 8: run ` docker compose exec -it -u 1000 laravel php artisan migrate `
38
38
- step 9: open [ localhost] ( http://localhost ) to see laravel welcome page
Original file line number Diff line number Diff line change @@ -20,15 +20,6 @@ services:
20
20
# # command: tail -f /dev/null
21
21
# command: npm run dev -- --host
22
22
23
- composer :
24
- container_name : " ${APP_NAME}-composer"
25
- build : " ./mnr_docker/composer"
26
- image : " mnr-laravel-11/composer"
27
- restart : unless-stopped
28
- working_dir : /project
29
- volumes :
30
- - " .:/project"
31
-
32
23
mysql :
33
24
container_name : " ${APP_NAME}-mysql"
34
25
build : " ./mnr_docker/mysql"
Original file line number Diff line number Diff line change @@ -18,11 +18,6 @@ services:
18
18
# # command: npm run dev -- --host
19
19
# command: tail -f /dev/null
20
20
21
- composer :
22
- extends :
23
- file : docker-compose-common.yml
24
- service : composer
25
-
26
21
mysql :
27
22
extends :
28
23
file : docker-compose-common.yml
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ services:
8
8
depends_on :
9
9
- mysql
10
10
- redis
11
- - composer
12
11
13
12
#
14
13
# node:
@@ -21,11 +20,6 @@ services:
21
20
# command: npm run dev -- --host
22
21
# command: tail -f /dev/null
23
22
24
- composer :
25
- extends :
26
- file : docker-compose-common.yml
27
- service : composer
28
-
29
23
mysql :
30
24
extends :
31
25
file : docker-compose-common.yml
Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ ENV USERNAME www-data
10
10
11
11
RUN apt-get update -y && apt-get install -y cron supervisor
12
12
13
+ #install composer
14
+ RUN curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
15
+ RUN HASH=`curl -sS https://composer.github.io/installer.sig`
16
+ RUN php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
17
+ RUN php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
18
+
13
19
#install packages for working with images. libraries like https://image.intervention.io/ need this.
14
20
RUN apt-get install -y libpng-dev libjpeg-dev libwebp-dev libfreetype6-dev libjpeg62-turbo-dev
15
21
RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp
@@ -46,6 +52,10 @@ RUN mkdir -p /var/www/.config/psysh
46
52
RUN chmod -R 755 /var/www/.config
47
53
RUN chown -R www-data:www-data /var/www/.config
48
54
55
+ RUN mkdir -p /var/www/.composer
56
+ RUN chmod -R 755 /var/www/.composer
57
+ RUN chown -R www-data:www-data /var/www/.composer
58
+
49
59
# you can add php config 👇
50
60
# RUN echo "memory_limit = 2048M" > $PHP_INI_DIR/conf.d/config.ini
51
61
You can’t perform that action at this time.
0 commit comments