feat: build tailwind for production on docker build
This commit is contained in:
+1
-3
@@ -14,9 +14,7 @@ RUN apt-get update && \
|
|||||||
apt-get autoremove -y
|
apt-get autoremove -y
|
||||||
|
|
||||||
COPY . /code
|
COPY . /code
|
||||||
|
|
||||||
COPY nginx/nginx.conf /etc/nginx/sites-enabled/default
|
COPY nginx/nginx.conf /etc/nginx/sites-enabled/default
|
||||||
|
|
||||||
RUN python manage.py collectstatic --noinput
|
RUN ["sh", "scripts/build_static.sh"]
|
||||||
|
|
||||||
CMD [ "sh", "./scripts/run.sh" ]
|
CMD [ "sh", "./scripts/run.sh" ]
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# installs nvm (Node Version Manager)
|
||||||
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
|
||||||
|
|
||||||
|
# download and install Node.js (you may need to restart the terminal)
|
||||||
|
nvm install 22
|
||||||
|
|
||||||
|
python manage.py tailwind build
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
|
||||||
|
rm -rf ~/.nvm
|
||||||
|
rm -rf ~/.npm
|
||||||
|
rm -rf ~/.bower
|
||||||
Reference in New Issue
Block a user