Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit 5928bd2

Browse files
authored
Merge pull request #107 from vim/documentation/README
docu(README) => Add getting started section in readme
2 parents 629de66 + 26f0e28 commit 5928bd2

File tree

4 files changed

+60
-25
lines changed

4 files changed

+60
-25
lines changed

.env.example

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,19 @@ DATABASE_CLIENT=mysql2
44
DATABASE_USERNAME=vim
55
DATABASE_PASSWORD=super-secret
66
DATABASE_PORT=3306
7-
DATABASE_SSL=false
7+
DATABASE_SSL=false
8+
9+
WEB_DATABASE_NAME=vim
10+
NEXT_PRIVATE_STANDALONE=true
11+
NEXTAUTH_SECRET=testsecret
12+
13+
CMS_DATABASE_NAME=vim_cms
14+
CMS_HOST=0.0.0.0
15+
CMS_PORT=1337
16+
CMS_APP_KEYS=testkey1,testkey2
17+
CMS_API_TOKEN_SALT=testtoken
18+
CMS_ADMIN_JWT_SECRET=testsecret
19+
CMS_JWT_SECRET=testsecret
20+
CMS_TRANSFER_TOKEN_SALT=testtoken
21+
CMS_DISABLE_UPDATE_NOTIFICATION=false
22+
CMS_TELEMETRY_DISABLED=true

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,43 @@
44
This is the relaunch of the new www.vim.org website. We have found a small team that will take on the
55
beautiful task of rebuilding the website with current design and new concepts.
66

7-
The new development should not take place behind closed doors, we want to
7+
The new development should not take place behind closed doors, we want to
88
make the new development public and transparent for you.
99

1010
Soon there will be a test system where you can follow the current status successively.
1111

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

14+
# Build
15+
16+
Prerequisites
17+
18+
* docker & docker-compose
19+
* npm
20+
21+
### Getting started
22+
23+
Run the application locally with these make commands.
24+
25+
```sh
26+
# start prebuilt containers
27+
make start
28+
29+
# or start containers for local development
30+
make dev
31+
```
32+
33+
This will setup default configuration (including dummy secrets),
34+
install npm dependencies and start the application using docker on port `3000`.
35+
36+
### Build locally
37+
38+
The following steps must be carried out:
39+
1. Copy contents of `.env.example` files on `root`, `root/cms` and `root/web` into `.env` file
40+
2. Install npm dependencies with `npm install` in the `root`, `root/cms` and `root/web` folder.
41+
3. Startup: `docker compose -f docker-compose.local.yml up`
42+
43+
For more information about the headless CMS used in this project, visit the official documentation: https://docs.strapi.io/
1444

1545
# Requirements
1646

@@ -27,7 +57,7 @@ Add your requirements here:
2757
## Non-Functional Requirements
2858

2959
* We want to continue using MySQL 8 as the database system.
30-
* We want the website to be fundamentally secure and avoid typical web application vulnerabilities (like SQL injection, XSS, ...) by design.
60+
* We want the website to be fundamentally secure and avoid typical web application vulnerabilities (like SQL injection, XSS, ...) by design.
3161
* The hashing of the user passwords is to be migrated to a hashing procedure that corresponds to the state of the art.
3262
* The frontend/backend stack shall:
3363
- should be maintainable and expandable in the future with reasonable effort

local-startup.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

makefile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.PHONY: clean build run logsmake
22

33
DC=docker compose -f docker-compose.local.yml
4+
DC_DEV=docker compose -f docker-compose.dev.yml
45

56
default: help
67
init: init-env check-env install
@@ -16,14 +17,17 @@ help:
1617
@echo "TARGETS:"
1718
@echo " init: initialize project"
1819
@echo
20+
@echo " // For starting application"
21+
@echo " start: use prebuilt containers"
22+
@echo
1923
@echo " // For local development"
2024
@echo " dev: start local development"
2125
@echo " dev-all: start all dev containers"
2226
@echo " dev-web: start dev web image"
2327
@echo " dev-cms: start dev cms image"
2428
@echo " dev-db: start dev db image"
2529
@echo
26-
@echo " // For building containers"
30+
@echo " // For building local containers"
2731
@echo " build: build all"
2832
@echo " build-web: build web image"
2933
@echo " build-cms: build cms image"
@@ -56,14 +60,14 @@ install:
5660

5761
init-env:
5862
test -f .env || cp .env.example .env
59-
test -f web/.env || cp .env.example web/.env
63+
cd web/ && ( test -f .env || cp .env.example .env )
6064
cd cms/ && ( test -f .env || cp .env.example .env )
6165
@echo '-----------------------------------------------------'
62-
@echo 'please update the .env files with the missing secrets'
66+
@echo 'please update the default secrets in the .env files'
6367

6468
check-env:
6569
./scripts/check-env.sh .env.example .env
66-
./scripts/check-env.sh .env.example web/.env
70+
./scripts/check-env.sh web/.env.example web/.env
6771
./scripts/check-env.sh cms/.env.example cms/.env
6872

6973
logs:
@@ -73,6 +77,9 @@ clean:
7377
$(DC) down
7478
$(DC) down --volumes
7579

80+
start:
81+
$(DC_DEV) up -d
82+
7683
stop:
7784
$(DC) stop
7885

@@ -85,6 +92,7 @@ stop-cms:
8592
stop-db:
8693
$(DC) stop db
8794

95+
8896
## DOCKER DEVELOPMENT
8997
dev: init dev-all
9098

0 commit comments

Comments
 (0)