Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy/deployment #116

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 18 additions & 43 deletions Docker/DockerfileLaravelDev
Original file line number Diff line number Diff line change
@@ -1,49 +1,24 @@
FROM php:8.2-apache
FROM php:8.2-fpm-alpine

Delyc marked this conversation as resolved.
Show resolved Hide resolved
RUN apt-get update && \
apt-get install -y \
cron \
libjpeg-dev \
libfreetype6-dev \
libxml2-dev \
libssl-dev \
mariadb-client \
zlib1g-dev \
bzip2 \
supervisor \
libzip-dev \
vim \
git \
zsh

# install ohmyzsh
RUN chsh -s $(which zsh)
RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# add php artisan alias
RUN echo 'alias "cmd=php artisan"' >> ~/.zshrc
WORKDIR /var/www/app

# remove apt lists
RUN rm -rf /var/lib/apt/lists/*

# install php extentions
RUN docker-php-ext-install gd mysqli zip pdo pdo_mysql soap ftp opcache bcmath pcntl
RUN docker-php-ext-configure gd --with-freetype --with-jpeg\
&& docker-php-ext-configure pcntl --enable-pcntl
RUN apk update && apk add \
build-base \
git \
curl \
zip \
libzip-dev \
libpq-dev \
postgresql \
postgresql-client \
unzip \
nano

RUN touch /usr/local/etc/php/conf.d/xdebug.ini; \
echo xdebug.remote_enable=1 >> /usr/local/etc/php/conf.d/xdebug.ini; \
echo xdebug.remote_autostart=0 >> /usr/local/etc/php/conf.d/xdebug.ini; \
echo xdebug.remote_connephpct_back=1 >> /usr/local/etc/php/conf.d/xdebug.ini; \
echo xdebug.remote_port=9000 >> /usr/local/etc/php/conf.d/xdebug.ini; \
echo xdebug.remote_log=/tmp/php5-xdebug.log >> /usr/local/etc/php/conf.d/xdebug.ini;log=/tmp/php5-xdebug.log >> /usr/local/etc/php/conf.d/xdebug.ini;
RUN docker-php-ext-configure pgsql
RUN docker-php-ext-install pdo pdo_pgsql pgsql zip exif pcntl

COPY configuration/webserver/sites-enabled/000-default.conf /etc/apache2/sites-enabled
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

COPY entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
USER root

RUN a2enmod ssl
RUN a2enmod rewrite
RUN service apache2 restart
RUN chmod 777 -R /var/www/app
2 changes: 2 additions & 0 deletions Website/htdocs/mpmanager/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/vendor
/node_modules
53 changes: 53 additions & 0 deletions Website/htdocs/mpmanager/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
FROM php:8.2-apache

WORKDIR /app
COPY . /app

RUN apt-get update && \
apt-get install -y \
cron \
libjpeg-dev \
libfreetype6-dev \
libxml2-dev \
libssl-dev \
mariadb-client \
zlib1g-dev \
bzip2 \
supervisor \
libzip-dev \
vim \
git \
zsh

# install ohmyzsh
RUN chsh -s $(which zsh)
RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# add php artisan alias
RUN echo 'alias "cmd=php artisan"' >> ~/.zshrc

# remove apt lists
RUN rm -rf /var/lib/apt/lists/*

# install php extentions
RUN docker-php-ext-install gd mysqli zip pdo pdo_mysql soap ftp opcache bcmath pcntl
RUN docker-php-ext-configure gd --with-freetype --with-jpeg\
&& docker-php-ext-configure pcntl --enable-pcntl

RUN touch /usr/local/etc/php/conf.d/xdebug.ini; \
echo xdebug.remote_enable=1 >> /usr/local/etc/php/conf.d/xdebug.ini; \
echo xdebug.remote_autostart=0 >> /usr/local/etc/php/conf.d/xdebug.ini; \
echo xdebug.remote_connephpct_back=1 >> /usr/local/etc/php/conf.d/xdebug.ini; \
echo xdebug.remote_port=9000 >> /usr/local/etc/php/conf.d/xdebug.ini; \
echo xdebug.remote_log=/tmp/php5-xdebug.log >> /usr/local/etc/php/conf.d/xdebug.ini;log=/tmp/php5-xdebug.log >> /usr/local/etc/php/conf.d/xdebug.ini;

RUN php composer.phar install

EXPOSE 80

COPY vhost.conf /etc/apache2/sites-available/000-default.conf

RUN chown -R www-data:www-data /app
RUN chmod -R 775 /app/storage

RUN a2enmod rewrite
11 changes: 11 additions & 0 deletions Website/htdocs/mpmanager/vhost.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<VirtualHost *:80>
DocumentRoot /app/public

<Directory "/app/public">
AllowOverride all
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require": {
"tymon/jwt-auth": "^2.1"
Delyc marked this conversation as resolved.
Show resolved Hide resolved
}
}
Loading
Loading