Skip to content

Commit

Permalink
#1437 upgrade node
Browse files Browse the repository at this point in the history
  • Loading branch information
stakovicz committed Oct 26, 2024
1 parent a067a02 commit aeec23b
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 65 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["7.4", "8.2"]
php:
- "7.4"
# - "8.2"

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ services:
args:
uid: ${CURRENT_UID:-1001}
gid: "1001"
ENABLE_XDEBUG: ${ENABLE_XDEBUG:-false}
env_file:
.env
user: localUser
Expand Down
72 changes: 28 additions & 44 deletions docker/dockerfiles/apachephp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,70 +1,54 @@
FROM php:7.4-apache

ARG ENABLE_XDEBUG=false
ARG uid=1008
ARG gid=1008

## Update system
RUN apt-get update && \
apt-get upgrade -y && \
apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/* && \
# Create user for Apache
groupadd -g ${gid} localUser && \
useradd -l -u ${uid} -g ${gid} -m -s /bin/bash localUser && \
usermod -a -G www-data localUser

RUN if [ "$ENABLE_XDEBUG" = "true" ]; then echo ************ XDEBUG ENABLED **********; \
else echo ------------ XDEBUG DISABLED ==========; fi

# Install required php extensions for afup website and other management package
# Install required PHP extensions for AFUP website and other management package
RUN apt-get update && \
apt-get install -y \
apt-get install -y --no-install-recommends \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libzip-dev \
libmcrypt4 \
libicu-dev \
wget && \
docker-php-ext-configure gd && \
docker-php-ext-install pdo_mysql mysqli zip gd intl pcntl && \
nodejs \
npm \
&& \
docker-php-ext-install \
pdo_mysql \
mysqli \
zip \
gd \
intl \
pcntl \
&& \
# Install Yarn
npm install -g yarn && \
if [ "$ENABLE_XDEBUG" = "true" ]; then pecl install xdebug-2.6.1 && docker-php-ext-enable xdebug; fi && \
apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/*

# Configuration of apache & php
# Configuration of Apache and PHP
COPY apache.conf /etc/apache2/sites-available/000-default.conf

RUN a2enmod rewrite && \
echo "Include sites-enabled/" >> /etc/apache2/apache2.conf && \
rm /etc/apache2/sites-enabled/000-default.conf && \
ln -s /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-enabled/000-default.conf && \
echo "date.timezone=Europe/Paris" >> "/usr/local/etc/php/php.ini"

# Install NodeJS
RUN apt-get update && \
apt-get install -y \
build-essential \
gnupg \
unzip \
nodejs && \
apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/*

# Install Yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
apt-get install -y yarn && \
apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/*

# Install local user mapped to the host user uid
ARG uid=1008
ARG gid=1008

RUN groupadd -g ${gid} localUser && \
useradd -l -u ${uid} -g ${gid} -m -s /bin/bash localUser && \
usermod -a -G www-data localUser && \
sed --in-place "s/User \${APACHE_RUN_USER}/User localUser/" /etc/apache2/apache2.conf && \
sed --in-place "s/Group \${APACHE_RUN_GROUP}/Group localUser/" /etc/apache2/apache2.conf

COPY apache.crt /etc/apache2/ssl/apache.crt
COPY apache.key /etc/apache2/ssl/apache.key

RUN a2enmod ssl
RUN sed --in-place "s/User \${APACHE_RUN_USER}/User localUser/" /etc/apache2/apache2.conf && \
sed --in-place "s/Group \${APACHE_RUN_GROUP}/Group localUser/" /etc/apache2/apache2.conf && \
a2ensite 000-default && \
a2enmod rewrite ssl && \
echo "date.timezone=Europe/Paris" >> "/usr/local/etc/php/php.ini"
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
"description": "Afup web",
"main": "index.js",
"dependencies": {
"angular": "1.2.16",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
"babel-preset-es2015": "^6.24.1",
"bootstrap": "3.1.1",
"bootswatch": "^3.2.0",
"clean-webpack-plugin": "^0.1.17",
"copy-webpack-plugin": "^4.1.1",
"css-loader": "^0.28.11",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^3.0.1",
"jquery": "^1.11.3",
"node-sass": "^4.11.0",
"notyf": "^2.0.1",
"qr-scanner": "^1.4.2",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
"tablefilter": "^0.5.42",
"webpack": "^3.6.0"
"angular": "^1.2",
"babel-core": "^6",
"babel-loader": "^7.1",
"babel-preset-es2015": "^6.24",
"bootstrap": "^3.1",
"bootswatch": "^3.2",
"clean-webpack-plugin": "^0.1",
"copy-webpack-plugin": "^4.1",
"css-loader": "^0.28",
"extract-text-webpack-plugin": "^3.0",
"file-loader": "^3.0",
"jquery": "^1.11",
"node-sass": "^4.11",
"notyf": "^2.0",
"qr-scanner": "^1.4",
"sass-loader": "^7.1",
"style-loader": "^0.23",
"tablefilter": "^0.5",
"webpack": "^3.6"
},
"scripts": {
"build": "./node_modules/.bin/webpack -p"
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const adminConfig = {
new CopyWebpackPlugin([
{ from: path.resolve(__dirname, 'node_modules/tablefilter/dist') },
{ from: path.resolve(__dirname, 'node_modules/jquery/dist/jquery.min.js'), to: path.resolve(__dirname, 'htdocs/assets/calendrier/js/jquery.min.js') },
{ from: path.resolve(__dirname, 'node_modules/angular/lib/angular.min.js'), to: path.resolve(__dirname, 'htdocs/assets/calendrier/js/angular.min.js') },
{ from: path.resolve(__dirname, 'node_modules/angular/angular.min.js'), to: path.resolve(__dirname, 'htdocs/assets/calendrier/js/angular.min.js') },
{ from: path.resolve(__dirname, 'node_modules/bootstrap/dist/js/bootstrap.min.js'), to: path.resolve(__dirname, 'htdocs/assets/calendrier/js/bootstrap.min.js') },
{ from: path.resolve(__dirname, 'node_modules/bootswatch/yeti/bootstrap.min.css'), to: path.resolve(__dirname, 'htdocs/assets/calendrier/css/bootstrap.min.css') },
{ from: path.resolve(__dirname, 'node_modules/bootswatch/fonts/'), to: path.resolve(__dirname, 'htdocs/assets/calendrier/fonts/') },
Expand Down

0 comments on commit aeec23b

Please sign in to comment.