File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,16 +37,15 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync \
3737
3838COPY --from=composer /usr/bin/composer /usr/bin/composer
3939
40- # Install NVM
41- RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
42- && export NVM_DIR="/root/.nvm" \
43- && . "$NVM_DIR/nvm.sh" \
44- && nvm install 20 \
45- && nvm alias default 20
40+ # Install Node.js and npm from official Node image
41+ COPY --from=node:20-bookworm-slim /usr/local/lib/node_modules /usr/local/lib/node_modules
42+ COPY --from=node:20-bookworm-slim /usr/local/bin/node /usr/local/bin/node
43+ RUN ln -sf /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
44+ && ln -sf /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx
4645
4746COPY config/php.ini /usr/local/etc/php/conf.d/
4847
4948WORKDIR /var/www/html
5049COPY wait-for-db.php /usr/local/bin/wait-for-db.php
5150COPY entrypoint.sh /usr/local/bin/entrypoint.sh
52- ENTRYPOINT ["sh " , "/usr/local/bin/entrypoint.sh" ]
51+ ENTRYPOINT ["bash " , "/usr/local/bin/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ if [ ! -f "vendor/autoload.php" ]; then
99 git clone --progress -b " ${AKAUNTING_VERSION} " --single-branch --depth 1 https://github.com/akaunting/akaunting /tmp/akaunting
1010 rsync -r /tmp/akaunting/ .
1111 rm -rf /tmp/akaunting
12- if [ $ APP_ENV = = " production" ]; then
12+ if [ " ${ APP_ENV} " = " production" ]; then
1313 composer install --no-dev --no-scripts
1414 else
1515 composer install --no-scripts
@@ -19,11 +19,11 @@ if [ ! -f "vendor/autoload.php" ]; then
1919 composer dump-autoload
2020 php artisan install --no-interaction --db-host=" ${DB_HOST} " --db-port=" ${DB_PORT} " --db-name=" ${DB_DATABASE} " --db-username=" ${DB_USERNAME} " --db-password=" ${DB_PASSWORD} " --db-prefix=" ${DB_PREFIX} " --admin-email=" ${ADM_EMAIL} " --admin-password=" ${ADM_PASSWD} "
2121 npm ci
22- if [ $ APP_ENV = = " production" ]; then
22+ if [ " ${ APP_ENV} " = " production" ]; then
2323 npm run production
2424 else
2525 npm run dev
2626 fi
2727 chown -R www-data:www-data .
2828fi
29- php-fpm
29+ exec php-fpm
You can’t perform that action at this time.
0 commit comments