Add application file
Browse files- Dockerfile +6 -13
- init-db.sh +1 -1
Dockerfile
CHANGED
@@ -32,6 +32,12 @@ COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
32 |
# Copy the custom initialization script
|
33 |
COPY init-db.sh /usr/local/bin/init-db.sh
|
34 |
RUN chmod +x /usr/local/bin/init-db.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
# Set the working directory
|
36 |
WORKDIR /var/www
|
37 |
|
@@ -55,20 +61,7 @@ RUN composer install
|
|
55 |
RUN php artisan key:generate
|
56 |
|
57 |
|
58 |
-
# Set environment variables for Bagisto
|
59 |
-
ENV DB_CONNECTION=mysql \
|
60 |
-
DB_HOST=127.0.0.1 \
|
61 |
-
DB_PORT=3306 \
|
62 |
-
DB_DATABASE=bagisto \
|
63 |
-
DB_USERNAME=bagisto \
|
64 |
-
DB_PASSWORD=bagisto
|
65 |
|
66 |
-
WORKDIR /var/www
|
67 |
-
|
68 |
-
# Initialize MySQL database
|
69 |
-
RUN bash init-db.sh
|
70 |
-
|
71 |
-
WORKDIR /var/www/bagisto
|
72 |
|
73 |
# Run Bagisto installation
|
74 |
RUN php artisan bagisto:install
|
|
|
32 |
# Copy the custom initialization script
|
33 |
COPY init-db.sh /usr/local/bin/init-db.sh
|
34 |
RUN chmod +x /usr/local/bin/init-db.sh
|
35 |
+
|
36 |
+
|
37 |
+
# Initialize MySQL database
|
38 |
+
RUN bash init-db.sh
|
39 |
+
|
40 |
+
|
41 |
# Set the working directory
|
42 |
WORKDIR /var/www
|
43 |
|
|
|
61 |
RUN php artisan key:generate
|
62 |
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
# Run Bagisto installation
|
67 |
RUN php artisan bagisto:install
|
init-db.sh
CHANGED
@@ -14,7 +14,7 @@ mysql -u root -proot -e "GRANT ALL PRIVILEGES ON bagisto.* TO 'bagisto'@'%';"
|
|
14 |
mysql -u root -proot -e "FLUSH PRIVILEGES;"
|
15 |
|
16 |
# Stop MySQL service
|
17 |
-
service mysql stop
|
18 |
|
19 |
# Start the main process
|
20 |
exec "$@"
|
|
|
14 |
mysql -u root -proot -e "FLUSH PRIVILEGES;"
|
15 |
|
16 |
# Stop MySQL service
|
17 |
+
# service mysql stop
|
18 |
|
19 |
# Start the main process
|
20 |
exec "$@"
|