Chad fc7a5dc57d
Stabilize Hyperling.com (#21)
* Make the backup puller a full-fledged script after all.

* Finish the main portion.

* Remove version tag to avoid log errors on Docker 26.0, Compose 2.25.0.

* Try moving to a smaller, faster, more stable image.

* Move Nextcloud to the stable tag.

* Add shortcut aliases.

* Rename container website to www.

* Do not install the latest of the PHP or Node programs if a version already exists in the container.

* We need git!!

* Try only git and the PHP interpretor.

* Remove comments.

* Install express at the image layer, not during runtime.

* Let the app install express after all.

* Remove warning about apt CLI.

* Try to cache the express download/install.

* Fix caching of Node packages.
2024-04-03 20:21:38 -07:00

26 lines
743 B
Docker

# 2022-10-29 Hyperling
# Create website in node container and run it.
# Using Debian testing so that we use PHP >8. Otherwise the shebangs from
# the include files (#!/usr/bin/php) show up on the website.
FROM node:lts-slim
# Cache System Dependencies
RUN apt-get update && apt-get install -y git php-cli
# 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
CMD cd /var/www/api && \
rm -rfv pages main.js run.sh && \
git clone https://github.com/Hyperling/Website website && \
rm -rfv website/files && \
mv -v website/* ./ && \
rm -rfv website && \
echo "Starting Website" && \
./run.sh