Compare commits
No commits in common. "454ab293a49b2847a0a47687761beec6940cf659" and "f85f47bbd4511378bceafb42c886d975425d0851" have entirely different histories.
454ab293a4
...
f85f47bbd4
5 changed files with 18 additions and 66 deletions
|
@ -1,7 +0,0 @@
|
||||||
node_modules
|
|
||||||
npm-debug.log
|
|
||||||
.dockerignore
|
|
||||||
.git
|
|
||||||
.gitignore
|
|
||||||
Dockerfile
|
|
||||||
README.md
|
|
56
Dockerfile
56
Dockerfile
|
@ -1,56 +0,0 @@
|
||||||
FROM node:20-bullseye
|
|
||||||
|
|
||||||
# install system dependencies
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
git \
|
|
||||||
openssh-client \
|
|
||||||
rsync \
|
|
||||||
curl \
|
|
||||||
php-cli \
|
|
||||||
php-mbstring \
|
|
||||||
jq \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# set working directory
|
|
||||||
WORKDIR /workdir
|
|
||||||
|
|
||||||
# build time args
|
|
||||||
ARG GIT_REPO
|
|
||||||
ARG GIT_BRANCH=main
|
|
||||||
|
|
||||||
# clone source
|
|
||||||
RUN git clone --depth 1 --branch ${GIT_BRANCH} ${GIT_REPO} app
|
|
||||||
|
|
||||||
# move into app directory
|
|
||||||
WORKDIR /workdir/app
|
|
||||||
|
|
||||||
# build-time env vars
|
|
||||||
ARG POSTGREST_API_KEY
|
|
||||||
ARG POSTGREST_URL
|
|
||||||
|
|
||||||
# export vars for build staps
|
|
||||||
ENV POSTGREST_API_KEY=${POSTGREST_API_KEY}
|
|
||||||
ENV POSTGREST_URL=${POSTGREST_URL}
|
|
||||||
|
|
||||||
# clean npm cache
|
|
||||||
RUN npm cache clean --force
|
|
||||||
|
|
||||||
# install deps
|
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
# build
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
# set runtime env vars
|
|
||||||
ARG SERVER_IP
|
|
||||||
ENV SERVER_IP=${SERVER_IP}
|
|
||||||
|
|
||||||
# deploy and manage container healthcheck
|
|
||||||
CMD bash -c "\
|
|
||||||
mkdir -p ~/.ssh && \
|
|
||||||
echo \"${SSH_PRIVATE_KEY}\" > ~/.ssh/id_rsa && \
|
|
||||||
chmod 600 ~/.ssh/id_rsa && \
|
|
||||||
ssh-keyscan -H \"${SERVER_IP}\" >> ~/.ssh/known_hosts && \
|
|
||||||
rsync -avz --delete dist/ root@\"${SERVER_IP}\":/var/www/coryd.dev/ && \
|
|
||||||
echo \"✅ Deployed successfully\" && \
|
|
||||||
tail -f /dev/null"
|
|
15
nixpacks.toml
Normal file
15
nixpacks.toml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[phases.setup]
|
||||||
|
aptPkgs = [
|
||||||
|
"curl",
|
||||||
|
"wget",
|
||||||
|
"zip",
|
||||||
|
"unzip",
|
||||||
|
"php-cli",
|
||||||
|
"php-mbstring",
|
||||||
|
"openssh-client",
|
||||||
|
"rsync",
|
||||||
|
"jq"
|
||||||
|
]
|
||||||
|
cmds = [
|
||||||
|
"curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/bin/composer && chmod +x /usr/bin/composer",
|
||||||
|
]
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "3.4.0",
|
"version": "3.3.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "3.4.0",
|
"version": "3.3.4",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"html-minifier-terser": "7.2.0",
|
"html-minifier-terser": "7.2.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "3.4.0",
|
"version": "3.3.4",
|
||||||
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue