2022-10-29 11:31:06 -05:00
|
|
|
# 2022-10-29 Hyperling
|
|
|
|
# Create website in node container and run it.
|
|
|
|
|
2023-07-23 02:32:53 +00:00
|
|
|
# Using Debian testing so that we use PHP >8. Otherwise the shebangs from
|
2022-10-30 08:05:41 -05:00
|
|
|
# the include files (#!/usr/bin/php) show up on the website.
|
2024-04-03 20:21:38 -07:00
|
|
|
FROM node:lts-slim
|
2022-10-30 08:05:41 -05:00
|
|
|
|
2024-04-03 20:21:38 -07:00
|
|
|
# Cache System Dependencies
|
|
|
|
RUN apt-get update && apt-get install -y git php-cli
|
2022-10-30 08:05:41 -05:00
|
|
|
|
2024-04-03 20:21:38 -07:00
|
|
|
# Cache Node Dependencies
|
|
|
|
RUN mkdir -p /var/www/api
|
|
|
|
WORKDIR /var/www/api
|
|
|
|
RUN echo '{ "dependencies": { "express": "" } }' > package.json
|
|
|
|
RUN npm install
|
|
|
|
|
|
|
|
# Install + Run Website
|
2024-01-25 02:49:00 +00:00
|
|
|
CMD cd /var/www/api && \
|
|
|
|
rm -rfv pages main.js run.sh && \
|
2025-01-03 07:59:46 -07:00
|
|
|
git clone https://git.hyperling.com/me/nodejs-website website && \
|
2024-01-25 02:49:00 +00:00
|
|
|
rm -rfv website/files && \
|
|
|
|
mv -v website/* ./ && \
|
|
|
|
rm -rfv website && \
|
2024-01-30 06:11:32 -07:00
|
|
|
echo "Starting Website" && \
|
2023-07-23 02:32:53 +00:00
|
|
|
./run.sh
|