Skip to content

Commit

Permalink
Merge pull request #130 from vim/feature/contributors-guide
Browse files Browse the repository at this point in the history
Feature/contributors guide
  • Loading branch information
FabianUntermoser authored Oct 30, 2024
2 parents 9a816e6 + 482a801 commit cdb1f33
Show file tree
Hide file tree
Showing 14 changed files with 13,190 additions and 4,440 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy-vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
source: "./docker-compose.dev.yml,./.env"
source: "./compose.prod.yml,./.env"
target: "~/${{ github.event.repository.name }}/"

- name: pull & start container images
Expand All @@ -46,7 +46,7 @@ jobs:
script: |
cd ~/${{ github.event.repository.name }}/
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{github.actor}} --password-stdin
docker compose -f docker-compose.dev.yml pull
docker compose -f docker-compose.dev.yml down
docker compose -f docker-compose.dev.yml up -d --wait --no-build --force-recreate
docker compose -f docker-compose.dev.yml logs -t -n 50
docker compose -f compose.prod.yml pull
docker compose -f compose.prod.yml down
docker compose -f compose.prod.yml up -d --wait --no-build --force-recreate
docker compose -f compose.prod.yml logs -t -n 50
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.18.2
44 changes: 44 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Contributing to Vim Website

First of all, thanks for your interest in contributing to the new website. All tasks, whether they are bug fixes or new features, are tracked as issues in our GitHub repository. For each issue, we follow a feature-branch workflow.

The `development`-branch is the primary branch for ongoing work, while the `main`-branch is reserved for production deployment. When addressing an issue, please create a new feature branch from `development` with the branch name matching the issue id or title (e.g. feature/(id or title)), then submit a PR for review. Once your PR is reviewed and approved, it will be merged into development.

## Commit Messages

We follow the Conventional Commits specification. Please use the structure explained in the [quick summary](https://www.conventionalcommits.org/en/v1.0.0/#summary) of the specification. Commit messages are written in the imperative present tense, describing what the commit does, as if giving a command or instruction. Examples are listed below.

```text
feat(web): add redirect instead of console.log (due to linting)
fix(ci): avoid running deploy job on PR pushes
chore(deps-dev): bump eslint-plugin-unused-imports from 3.1.0 to 3.2.0 in /cms
```

## Development Setup

The setup for this project consists of three main parts: the website (web), the content management system (cms), and the database (db). The website is built with Next.js, while the CMS is Strapi, and MySQL 8 is used for the database. You'll need Node.js with npm for both web and cms. If you want to start the applications without docker please refer to the specific Node.js versions indicated in the `.nvmrc` file or the `engines` field in `package.json`. However, we use Docker to facilitate the development process. Both the website and CMS have their own Dockerfile. All components are managed together in a docker-compose file.

For more information about the headless CMS used in this project, visit the official documentation: https://docs.strapi.io/

### Prerequisites

- Docker and Docker Compose
- Node.js and NPM
- MySQL 8
- Node version manager NVM
- Make

### Getting Started

```sh
git checkout development

# if you have node version manager installed otherwise ensure you have the correct node version, specified in .nvmrc
nvm use

# see makefile for available commands
make

# i.e install dependencies, setup .env files, start containers for local development and show logs
make dev logs
```
38 changes: 13 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

# Overview

This is the relaunch of the new www.vim.org website. We have found a small team that will take on the
This is the relaunch of the www.vim.org website. We have found a small team that will take on the
beautiful task of rebuilding the website with current design and new concepts.

The new development should not take place behind closed doors, we want to
Expand All @@ -11,6 +10,13 @@ Soon there will be a test system where you can follow the current status success

Of course, we will involve you, the community, in the design by collecting ideas and feedback.

Please read the [contribution guidelines](CONTRIBUTING.md) if you want to help out.

### New Design

The link below leads to a publicly accessible Miro board that contains a first draft of the new website design:
https://miro.com/app/board/uXjVKobQViM=/?share_link_id=158721849826

# Build

Prerequisites
Expand All @@ -20,33 +26,16 @@ Prerequisites

### Getting started

Run the application locally with these make commands.
Run the application locally with the following commands.

```sh
# start prebuilt containers
make start

# or start containers for local development
make dev
```

This will setup default configuration (including dummy secrets),
install npm dependencies and start the application using docker on port `3000`.

### Build locally

The following steps must be carried out:
1. Copy contents of `.env.example` files on `root`, `root/cms` and `root/web` into `.env` file
2. Install npm dependencies with `npm install` in the `root`, `root/cms` and `root/web` folder.
3. Startup: `docker compose -f docker-compose.local.yml up`

For more information about the headless CMS used in this project, visit the official documentation: https://docs.strapi.io/

# New Design

The link below leads to a publicly accessible Miro board that contains a first draft of the new website design:
https://miro.com/app/board/uXjVKobQViM=/?share_link_id=158721849826

# Requirements

Add your requirements here:
Expand All @@ -66,21 +55,20 @@ Add your requirements here:
* The hashing of the user passwords is to be migrated to a hashing procedure that corresponds to the state of the art.
* The frontend/backend stack shall:
- should be maintainable and expandable in the future with reasonable effort
- be opensource based
- be Open Source based
- the components used should be vital
- shall be efficient with server resources


# Idea collection

This is a unfinished and unstructed list of ideas:
This is a unfinished and instructed list of ideas:

- Tutorial section
- Vim tips revival
- The vim tricks
- My personal ".vimrc", with annotations about motivations
- Blog posts and annountements for the maintainers and artive editors
- My personal `.vimrc`, with annotations about motivations
- Blog posts and announcements for the maintainers and active editors
- Link resource section
- "How to contribute" section
- Vim distributions for the various platforms

1 change: 1 addition & 0 deletions cms/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ coverage
license.txt
exports
*.cache
.strapi
dist
build
.strapi-updater.json
2 changes: 1 addition & 1 deletion cms/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ RUN chown -R node:node /opt/app
USER node
RUN ["npm", "run", "build"]
EXPOSE 1337
CMD ["npm", "run", "develop"]
CMD ["npm", "run", "dev"]
6 changes: 3 additions & 3 deletions cms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/dev-docs/cli) (CLI) which lets you scaffold and manage your project in seconds.

### `develop`
### `dev`

Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-develop)

```
npm run develop
npm run dev
# or
yarn develop
yarn dev
```

### `start`
Expand Down
Loading

0 comments on commit cdb1f33

Please sign in to comment.