Build app image with bundled source
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
.git
|
||||||
|
**/.git
|
||||||
|
**/node_modules
|
||||||
|
**/.TugasSIG01-SPBU-point/.TugasSIG01-SPBU-point/node_modules
|
||||||
+26
-12
@@ -1,6 +1,31 @@
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: php:8.2-apache
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile_inline: |
|
||||||
|
FROM php:8.2-apache
|
||||||
|
|
||||||
|
RUN docker-php-ext-install mysqli pdo pdo_mysql \
|
||||||
|
&& a2enmod rewrite \
|
||||||
|
&& printf '%s\n' \
|
||||||
|
'<Directory /var/www/html>' \
|
||||||
|
' Options FollowSymLinks' \
|
||||||
|
' AllowOverride All' \
|
||||||
|
' Require all granted' \
|
||||||
|
'</Directory>' \
|
||||||
|
'DirectoryIndex index.php index.html' \
|
||||||
|
> /etc/apache2/conf-available/webgis.conf \
|
||||||
|
&& a2enconf webgis
|
||||||
|
|
||||||
|
COPY . /var/www/html/
|
||||||
|
|
||||||
|
RUN mkdir -p /var/www/html/02/uploads \
|
||||||
|
/var/www/html/05/assets/uploads \
|
||||||
|
/var/www/html/05/uploads/bukti \
|
||||||
|
&& chmod -R a+rX /var/www/html \
|
||||||
|
&& chown -R www-data:www-data /var/www/html/02/uploads \
|
||||||
|
/var/www/html/05/assets/uploads \
|
||||||
|
/var/www/html/05/uploads
|
||||||
expose:
|
expose:
|
||||||
- "80"
|
- "80"
|
||||||
environment:
|
environment:
|
||||||
@@ -8,17 +33,6 @@ services:
|
|||||||
DB_USER: webgis
|
DB_USER: webgis
|
||||||
DB_PASSWORD: webgis_password
|
DB_PASSWORD: webgis_password
|
||||||
DB_NAME: webgis_project
|
DB_NAME: webgis_project
|
||||||
volumes:
|
|
||||||
- ./:/var/www/html
|
|
||||||
command: >
|
|
||||||
bash -lc "docker-php-ext-install mysqli pdo pdo_mysql
|
|
||||||
&& a2enmod rewrite
|
|
||||||
&& printf '%s\\n' '<Directory /var/www/html>' ' Options Indexes FollowSymLinks' ' AllowOverride All' ' Require all granted' '</Directory>' 'DirectoryIndex index.php index.html' > /etc/apache2/conf-available/webgis.conf
|
|
||||||
&& a2enconf webgis
|
|
||||||
&& mkdir -p /var/www/html/02/uploads /var/www/html/05/assets/uploads /var/www/html/05/uploads/bukti
|
|
||||||
&& chmod -R a+rX /var/www/html
|
|
||||||
&& chown -R www-data:www-data /var/www/html/02/uploads /var/www/html/05/assets/uploads /var/www/html/05/uploads
|
|
||||||
&& apache2-foreground"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|||||||
Reference in New Issue
Block a user