Skip to content

Commit

Permalink
Install mod_ssl for SSL support
Browse files Browse the repository at this point in the history
  • Loading branch information
kmaxii committed Oct 16, 2024
1 parent 438207d commit 76eb783
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN apt-get update && apt-get install -y \
unzip \
default-jre \
wget \
libapache2-mod-ssl \
&& docker-php-ext-install mysqli pdo pdo_mysql zip \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

Expand All @@ -15,7 +16,7 @@ RUN mkdir /liquibase && \
wget -O /liquibase/liquibase.tar.gz https://github.com/liquibase/liquibase/releases/download/v4.28.0/liquibase-4.28.0.tar.gz && \
tar -xzf /liquibase/liquibase.tar.gz -C /liquibase && \
rm /liquibase/liquibase.tar.gz && \
chmod +x /liquibase/liquibase
chmod +x /liquibase/liquibase

# Add Liquibase to PATH
ENV PATH="/liquibase:${PATH}"
Expand All @@ -39,22 +40,25 @@ RUN composer install
RUN chown -R www-data:www-data /var/www/html && \
chmod -R 755 /var/www/html

# Enable Apache mod_rewrite (if needed for .htaccess)
# Enable Apache mod_rewrite and SSL
RUN a2enmod rewrite
RUN a2enmod ssl

# Copy custom php.ini
COPY php.ini /usr/local/etc/php/conf.d/

# Copy Liquibase changelog files
COPY ./liquibase /var/www/html/liquibase

# Create a script to run Liquibase and start Apache
COPY start.sh /start.sh
RUN chmod +x /start.sh

# Copy SSL configuration file
COPY ssl.conf /etc/apache2/sites-available/ssl.conf

# Enable the SSL virtual host
RUN a2ensite ssl.conf

# Create a script to run Liquibase and start Apache
COPY start.sh /start.sh
RUN chmod +x /start.sh

# Use the start script as the entry point
CMD ["/start.sh"]

0 comments on commit 76eb783

Please sign in to comment.