Skip to content

Commit

Permalink
nvm working now
Browse files Browse the repository at this point in the history
  • Loading branch information
mik-p committed Jun 1, 2024
1 parent bb356e7 commit 51bd53e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions templates/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN apt-get update && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN a2enmod ssl; \
a2ensite default-ssl;
a2ensite default-ssl;

EXPOSE 80
EXPOSE 443
Expand Down Expand Up @@ -81,14 +81,16 @@ RUN curl -sS https://getcomposer.org/installer | php -- --2 --install-dir=/usr/l
{% if TEMPLATE_PHP_VERSION != '7.4' -%}
# install latest nodejs via nvm (Node Version Manager)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
export NVM_DIR="/root/.nvm" && \
[ -s "/root/.nvm/nvm.sh" ] && \. "/root/.nvm/nvm.sh" && \
nvm install 20

{% endif -%}

# install wintercms, set laravel env, and create database
RUN composer create-project --prefer-dist wintercms/winter:{{ TEMPLATE_WINTERCMS_VERSION }} . && \
echo 'APP_ENV=docker' > .env && \
touch storage/database.sqlite
touch storage/database.sqlite

# get laravel env config files
COPY config/docker config/docker
Expand All @@ -103,7 +105,7 @@ RUN chown -R www-data:www-data /var/www/html && \

# Initialize crontab for the Winter CMS scheduler
RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/winter-cron && \
crontab /etc/cron.d/winter-cron
crontab /etc/cron.d/winter-cron

{% if TEMPLATE_PHP_VARIANT == 'apache' -%}
# enable mod rewrite
Expand Down

0 comments on commit 51bd53e

Please sign in to comment.