kind of working
This commit is contained in:
@@ -1,22 +1,34 @@
|
||||
# Use the official Debian image as a base
|
||||
FROM debian:latest
|
||||
FROM debian:bullseye
|
||||
|
||||
# Set environment variables
|
||||
# ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Update the package list and install Apache2 and MariaDB
|
||||
RUN apt-get update && \
|
||||
apt-get install -y apache2 && \
|
||||
apt-get install -y apache2 apache2-dev && \
|
||||
apt-get clean && \
|
||||
a2dismod mpm_event && \
|
||||
a2enmod mpm_prefork && \
|
||||
# apt-get install -y libapache2-rewrite && \
|
||||
a2enmod rewrite && \
|
||||
apt-get install -y libapache2-mod-perl2 libperl-dev libapache2-reload-perl libapache2-request-perl libapache2-mod-apreq2 build-essential imagemagick libapreq2-3 libapache-dbi-perl libauthen-sasl-perl libauthen-passphrase-perl libcalendar-simple-perl libcrypt-blowfish-perl libcgi-pm-perl libcgi-session-perl libcgi-simple-perl libconfig-general-perl libdatetime-perl libdate-calc-perl libdate-manip-perl libdbi-perl libdbd-mysql-perl libemail-sender-perl libencode-perl libjson-perl libhtml-formattext-withlinks-andtables-perl libhtml-parser-perl libhtml-template-perl libhtml-template-compiled-perl libmime-tools-perl libsession-token-perl libtext-multimarkdown-perl libtext-unidecode-perl libtext-wikicreole-perl liburi-escape-xs-perl perlmagick sox libsox-fmt-all && \
|
||||
a2enmod perl && \
|
||||
service apache2 restart && \
|
||||
cpan App::cpanminus && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# RUN ["cpanm", "--force", "Image::Magick", "Image::Magick::Square" ]
|
||||
# RUN ["cpanm", "--force", "Apache2::Reload", "Apache2::Request", "Apache2::Upload", "Apache::DBI", "Authen::Passphrase", "Authen::Passphrase::BlowfishCrypt", "Calendar::Simple", "CGI", "CGI::Carp", "CGI::Cookie", "CGI::Session", "CGI::Simple", "Config::General", "Data::Dumper", "Date::Calc", "Date::Manip", "DateTime", "DBD::mysql", "DBI", "Digest::MD5", "Encode::Locale", "HTML::Entities", "HTML::FormatText", "HTML::Parse", "HTML::Template::Compiled", "HTML::Template::Compiled::Plugin::XMLEscape", "Image::Magick", "Image::Magick::Square", "JSON", "ModPerl::Util", "Session::Token", "Text::Diff::FormatedHtml", "Text::Markdown", "Text::WikiCreole", "URI::Escape" ]
|
||||
|
||||
# Copy your website files to the Apache document root (optional)
|
||||
COPY ./install/apache2-sites/coloradio.conf /etc/conf/apache2/sites-enabled/
|
||||
|
||||
COPY . /var/www/html/.
|
||||
COPY ./install/apache2-sites/calcms.conf /etc/apache2/sites-enabled/
|
||||
COPY ./website/agenda/config/config.cgi.off /var/www/html/website/config/config.cgi
|
||||
COPY ./website/agenda/config/config.cgi.off /var/www/html/website/agenda/config/config.cgi
|
||||
# Expose ports for Apache and MariaDB
|
||||
EXPOSE 80
|
||||
|
||||
# Start both Apache and MariaDB
|
||||
CMD service apache2 start && \
|
||||
CMD service apache2 restart && \
|
||||
tail -f /var/log/apache2/access.log
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
services:
|
||||
#web:
|
||||
# build:
|
||||
# context: ..
|
||||
# dockerfile: ./docker/Dockerfile
|
||||
# ports:
|
||||
# - "80:80"
|
||||
# #volumes:
|
||||
# #- ./your-website-files:/var/www/html/
|
||||
# #- ./httpd.conf:/etc/apache2/sites-available/000-default.conf
|
||||
web:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: ./docker/Dockerfile
|
||||
ports:
|
||||
- "80:80"
|
||||
#volumes:
|
||||
#- ../:/var/www/html/
|
||||
#- ./httpd.conf:/etc/apache2/sites-available/000-default.conf
|
||||
|
||||
db:
|
||||
image: mariadb:10
|
||||
|
||||
12
docker/initdb.sh
Executable file
12
docker/initdb.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Call the original entrypoint script
|
||||
exec docker-entrypoint.sh
|
||||
|
||||
# Run the first script as root
|
||||
mariadb -h 127.0.0.1 -u root -p"$MYSQL_ROOT_PASSWORD" < /init/01-init.sql
|
||||
#
|
||||
## Run the second script as caladmin
|
||||
mariadb -h 127.0.0.1 -u calcms_admin -pcaladmin000 < /init/02-create.sql
|
||||
|
||||
Reference in New Issue
Block a user