Skip to content

Commit 2a669af

Browse files
updated
1 parent e4594b1 commit 2a669af

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

Dockerfile

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
FROM php:8.2-fpm
88

9+
LABEL authors="Rifat"
10+
911
# Set Environment Variables
1012
ENV DEBIAN_FRONTEND noninteractive
1113

@@ -24,6 +26,8 @@ RUN set -eux; \
2426
apt-get upgrade -y; \
2527
apt-get install -y --no-install-recommends \
2628
curl \
29+
zip \
30+
unzip \
2731
libmemcached-dev \
2832
libz-dev \
2933
libpq-dev \
@@ -53,18 +57,24 @@ RUN set -eux; \
5357
php -r 'var_dump(gd_info());'
5458

5559
# Install Node.js and npm
56-
#RUN apt-get update && apt-get install -y nodejs npm
60+
RUN apt-get update && apt-get install -y nodejs npm
5761

5862
# Install composer (php package manager)
5963
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
6064

6165
# Copy composer.lock and composer.json into the working directory
6266
COPY composer.lock composer.json /var/www/html/
6367

68+
# Copy package.json and package-lock.json into the image
69+
#COPY package*.json /var/www/html
70+
71+
# Copy the node_modules directory into the image
72+
#COPY --from=node node_modules /var/www/html
73+
6474
# Set working directory
6575
WORKDIR /var/www/html/
6676

67-
ADD . /var/www/html
77+
COPY . /var/www/html
6878

6979
# Set ownership and permissions for the storage directory
7080
RUN chown -R www-data:www-data /var/www/html/storage
@@ -74,4 +84,7 @@ RUN chmod -R 775 /var/www/html/storage
7484
RUN chown www-data:www-data /var/www/html/storage/logs/laravel.log
7585
RUN chmod 664 /var/www/html/storage/logs/laravel.log
7686

87+
Refferecn
88+
https://github.com/nimatrazmjo/laravel-vuejs-docker/blob/main/Dockerfile.prod
89+
7790

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Docker development implementation for Laravel 8.\* with:
77
- PHP8.2
88
- Vue
99
- Node
10+
- Reddis
1011

1112
## Installation
1213

@@ -25,6 +26,9 @@ Docker development implementation for Laravel 8.\* with:
2526
- Install javascript dependencies: `npm install`
2627
- Compile the assets: `yarn dev` / `yarn watch` / `dcoker-compose run npm run dev`
2728
- You can access the project at: `http://localhost:8000`
29+
- or
30+
- Install composer dependencies: `docker-compose run php composer install`
31+
- Install javascript dependencies: `docker-compose run npm install`
2832

2933

3034
## Contributing

docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ services:
5858
networks:
5959
- webapp
6060

61+
redis:
62+
image: redis:4.0
63+
container_name: ${APP_NAME}_redis
64+
ports:
65+
- "6379:6379"
66+
networks:
67+
- webapp
68+
6169
volumes:
6270
mysql:
6371
driver: local

0 commit comments

Comments
 (0)