Dockerizes website, adds license (MIT), sample .env, docs (README.txt) and updates .gitignore to iforget build assets

This commit is contained in:
Alicia Sykes 2024-02-25 22:32:43 +00:00
parent e17a8c5b9c
commit 9e278676eb
6 changed files with 117 additions and 35 deletions

30
.github/README.md vendored
View File

@ -1,8 +1,6 @@
<p align="center" id="top"><a href="https://github.com/Lissy93/awesome-privacy"><img src="https://i.ibb.co/80Y5x2T/Awesome-Privacy.png" /></a></p>
<p align="center">🌐 <b><a href="https://awesome-privacy.xyz">awesome-privacy.xyz</a></b></p>
*<p align="center">A curated list of privacy & security-focused apps, software, and providers 🔐</p>*
<p align="center"><i>A curated list of privacy & security-focused apps, software, and providers</i> 🔐</p>
[⏬ Skip to Content ⏬](#password-managers)
@ -12,12 +10,13 @@ Large data-hungry corporations dominate the digital world but with little, or no
Migrating to open-source applications with a strong emphasis on privacy and security will help stop
corporations, governments, and hackers from logging, storing or selling your personal data.
**Note**: Remember that [no software is perfect](#important-considerations), and it is important to follow good [security practices](https://github.com/Lissy93/personal-security-checklist/blob/HEAD/CHECKLIST.md).
A Codeberg mirror is available [here](https://codeberg.org/alicia/awesome-privacy).
**Note**: Remember that [no software is perfect](#important-considerations), and it is important to follow good [security practices](https://github.com/Lissy93/personal-security-checklist/blob/HEAD/CHECKLIST.md)<br>
**Mirror**: This repo is mirrored to [https://codeberg.org/alicia/awesome-privacy](https://codeberg.org/alicia/awesome-privacy)<br>
**Repo Admin**: [Website Docs](#the-website) | [Contributing](#contributing) | [Acknowledgment](#acknowledgements) | [License](#license)
<!-- awesome-privacy-start -->
## Contents
<details>
<summary><h2>Contents</h2></summary>
- **Essentials**
- [Password Managers](#password-managers) (5)
@ -115,6 +114,8 @@ A Codeberg mirror is available [here](https://codeberg.org/alicia/awesome-privac
- [Screenshot Tools](#screenshot-tools) (0)
- [3D Graphics](#3d-graphics) (0)
- [Animation](#animation) (0)
</details>
## Essentials
### Password Managers
@ -3127,7 +3128,8 @@ Then run the following commands to fetch the code, install dependencies and star
```shell
git clone git@github.com:Lissy93/awesome-privacy.git
cd awesome-privacy/web
yarn
cp .env.sample .env
yarn install
yarn dev
# Then open 127.0.0.1:4321 in your browser
```
@ -3534,7 +3536,9 @@ This project exists thanks to all the people who've helped build and maintain it
## License
> _**[Lissy93/Awesome-Privacy](https://github.com/Lissy93/awesome-privacy)** is licensed under [MIT](https://github.com/Lissy93/awesome-privacy/blob/HEAD/LICENSE) © [Alicia Sykes](https://aliciasykes.com) 2024._<br>
> _**[Lissy93/Awesome-Privacy/web](https://github.com/Lissy93/awesome-privacy/tree/main/web)** is licensed under [MIT](https://gist.github.com/Lissy93/143d2ee01ccc5c052a17)_<br>
> _**[awesome-privacy.yml](https://github.com/Lissy93/awesome-privacy/blob/main/awesome-privacy.yml)** is licensed under [CC0-1.0 license](https://github.com/Lissy93/awesome-privacy/blob/HEAD/LICENSE)_<br>
> _Copyright © Alicia Sykes <[aliciasykes.com](https://aliciasykes.com)> 2024._<br>
> <sup align="right">For information, see <a href="https://tldrlegal.com/license/mit-license">TLDR Legal > MIT</a></sup>
<details>
@ -3564,13 +3568,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</details>
<!-- License + Copyright -->
<p align="center">
<i>© <a href="https://aliciasykes.com">Alicia Sykes</a> 2024</i><br>
<i>Licensed under <a href="https://gist.github.com/Lissy93/143d2ee01ccc5c052a17">MIT</a></i><br>
<a href="https://github.com/lissy93"><img src="https://i.ibb.co/4KtpYxb/octocat-clean-mini.png" /></a><br>
<sup>Thanks for visiting :)</sup>
<i>Licensed under <a href="https://gist.github.com/Lissy93/143d2ee01ccc5c052a17">MIT</a> &
<a href="https://github.com/Lissy93/awesome-privacy/blob/HEAD/LICENSE">CC0-1.0</a></i><br>
<a href="https://github.com/lissy93"><img src="https://i.ibb.co/4KtpYxb/octocat-clean-mini.png" /></a>
<br><sup>Thanks for visiting :)</sup>
</p>
<!-- Dinosaurs are Awesome -->

23
web/.env.sample Normal file
View File

@ -0,0 +1,23 @@
# Copy this file to web/.env and complete the values
# Once completed, DO NOT commit this file to source control!
# Need help? Check the GitHub: https://github.com/lissy93/awesome-privacy
# The target deployment platform (can be vercel, netlify, cloudflare, node)
# Use to determine appropriate Astro adapter at build-time
DEPLOY_TARGET='';
# The build output method (can be 'server' or 'hybrid')
# To set weather content is pre-rendered or rendered on-demand
OUTPUT=''
# The fully qualified domain name for your site
# Used to generate sitemap.xml and for canonical URLs
SITE_URL=''
# GitHub API key (with pub repo read perms).
# This is used to fetch reposity stats for open source apps which are listed
GITHUB_API_KEY=''
# A Font Awesome Pro package token
# This is used in order to install Font Awesome and fetch pro icons
FONTAWESOME_PACKAGE_TOKEN=''

16
web/.gitignore vendored
View File

@ -1,21 +1,21 @@
# build output
dist/
# generated types
.astro/
# dependencies
node_modules/
# logs
# Install + buuld logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# build output
dist/
# generated types
.astro/
.vercel/
# environment variables
.env
.env.production
# macOS-specific files
# macOS crap
.DS_Store

32
web/Dockerfile Normal file
View File

@ -0,0 +1,32 @@
###############################################################################
# A lightweight, non-root, multi-stage, cross-architecture Dockerfile #
# That you can use in order to easily deploy Awesome Privacy to any server #
# For docs visit the GitHub repo: https://github.com/lissy93/awesome-privacy #
# Licensed under MIT (C) Alicia Sykes <https://aliciasykes.com> 2024 #
###############################################################################
# Usage: #
# Step 1: Build the Docker image #
# docker build -t awesome-privacy . #
# #
# Step 2: Run the Docker container #
# docker run -p 8080:80 awesome-privacy #
# #
# Step 3: Access the running app #
# Open your browser and navigate to http://127.0.0.1:8080 #
###############################################################################
# Stage 1: Build the app (Alpine + Node.js)
# Copies manifest and src files from host, installs deps, and builds the app
FROM node:16-alpine as build
WORKDIR /app
COPY package.json yarn.lock .env* ./
RUN yarn install --frozen-lockfile
COPY . .
RUN yarn build
# Stage 2: Serve the app (Alpine + NGINX)
# Copies dist from the previous stage, exposes port 80, and starts web server
FROM nginx:alpine as runtime
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

21
web/LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 Alicia Sykes <https://github.com/lissy93>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -11,16 +11,18 @@ DEVELOPMENT SETUP
To get started, you'll need Node and Git installed.
Then run the following commands:
# 1. Clone the repo
git clone git@github.com:Lissy93/awesome-privacy.git
# 2. Navigate into it
cd awesome-privacy/web
# 3. Install dependencies
yarn install
# 4. Start the development server
yarn dev
5. Open browser
open http://127.0.0.1:4321
1. Clone the repo
git clone git@github.com:Lissy93/awesome-privacy.git
2. Navigate into it
cd awesome-privacy/web
3. Add secrets to .env
mv .env.sample .env
4. Install dependencies
yarn install
5. Start the development server
yarn dev
Open browser
open http://127.0.0.1:4321
================================================================================
@ -36,12 +38,12 @@ Option 3) Use the included Dockerfile to build and run the application on any se
TECHNOLOGY
----------
The website is built with Astro, and statically generated at build-time.
This means that changes to the data will not be reflected until the site is rebuilt.
This means that changes to the raw data will not be reflected until the site is rebuilt.
Dynamic elems (search + comments) are built as Svelte islands, and rehydrated at runtime.
Most the code is written in Typescript. We're not using a CSS library, just plain SASS.
The site also uses:
- Fuse.js for fuzzy search
The site also uses these dependencies:
- fuse.js for fuzzy search
- js-yaml for parsing YAML
- marked for markdown rendering
- fontawesome for iconography
@ -58,7 +60,7 @@ If you only wish to update content, there's no need to edit the site's source co
SITE STRUCTURE
--------------
All views are located in /src/pages.
All views are located in /src/pages
The general site structure is as follows:
/