mfoud444 commited on
Commit
1eb5b68
1 Parent(s): 142c7d7

Add application file

Browse files
Files changed (1) hide show
  1. Dockerfile +58 -0
Dockerfile CHANGED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official PHP image as the base image
2
+ FROM php:7.4-fpm
3
+
4
+ # Set environment variables
5
+ ENV COMPOSER_ALLOW_SUPERUSER=1
6
+
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ libpng-dev \
10
+ libjpeg-dev \
11
+ libfreetype6-dev \
12
+ libzip-dev \
13
+ libonig-dev \
14
+ libxml2-dev \
15
+ libmcrypt-dev \
16
+ libcurl4-openssl-dev \
17
+ libicu-dev \
18
+ unzip \
19
+ git \
20
+ zlib1g-dev \
21
+ libxslt-dev \
22
+ && docker-php-ext-configure gd --with-freetype --with-jpeg \
23
+ && docker-php-ext-install gd zip pdo pdo_mysql mysqli \
24
+ && pecl install xdebug \
25
+ && docker-php-ext-enable xdebug \
26
+ && apt-get clean \
27
+ && rm -rf /var/lib/apt/lists/*
28
+
29
+ # Install Composer
30
+ COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
31
+
32
+ # Set the working directory
33
+ WORKDIR /var/www
34
+
35
+ # Copy the Bagisto application
36
+ COPY . /var/www
37
+
38
+ # Install Bagisto dependencies
39
+ RUN composer install
40
+
41
+ # Configure environment
42
+ COPY .env.example .env
43
+
44
+ # Generate application key
45
+ RUN php artisan key:generate
46
+
47
+ # Run Bagisto installation
48
+ RUN php artisan bagisto:install
49
+ RUN php artisan migrate
50
+ RUN php artisan db:seed
51
+ RUN php artisan vendor:publish --all
52
+ RUN php artisan storage:link
53
+
54
+ # Expose port 9000
55
+ EXPOSE 9000
56
+
57
+ # Start the PHP-FPM server
58
+ CMD ["php-fpm"]