Features: 1) Add detailed introductory spacing for "by WISELESS TEAM" across all scripts; 2) Update README installation instructions with step-by-step guides for environment setup and configuration;
Fixes: None; Extra: Improve overall readability and formatting of README;
This commit is contained in:
parent
7d1bcaa8d4
commit
33245134c9
13 changed files with 72 additions and 77 deletions
125
README.md
125
README.md
|
|
@ -30,8 +30,7 @@ cases and learning Django skills. The project is easy to customize, allowing for
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
- Docker and Docker Compose installed on your machine.
|
- Docker and Docker Compose installed on your machine - that's it!
|
||||||
- Python 3.12 if running locally without Docker.
|
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
|
|
@ -42,15 +41,49 @@ cases and learning Django skills. The project is easy to customize, allowing for
|
||||||
cd eVibes
|
cd eVibes
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Copy the example environment file and configure it.
|
2. Choose the storefront. By default, `main` branch has Astro one. Skip this step if you're OK with Astro.
|
||||||
|
|
||||||
3. Build and start the services:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose up -d --build
|
git checkout storefront-<option: astro, nuxt, remix, svelte, solid, analog >
|
||||||
```
|
```
|
||||||
|
|
||||||
This command will build the Docker images and start all the services defined in the `docker-compose.yml` file.
|
3. Generate your .env file. Check and confirm the contents afterwards.
|
||||||
|
|
||||||
|
- Windows
|
||||||
|
```powershell
|
||||||
|
scripts\Windows\generate-environment-file.ps1
|
||||||
|
```
|
||||||
|
- Unix
|
||||||
|
```bash
|
||||||
|
scripts/Unix/generate-environment-file.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Install all the dependencies.
|
||||||
|
|
||||||
|
- Windows
|
||||||
|
```powershell
|
||||||
|
scripts\Windows\install.ps1
|
||||||
|
```
|
||||||
|
- Unix
|
||||||
|
```bash
|
||||||
|
scripts/Unix/install.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Spin it up.
|
||||||
|
|
||||||
|
- Windows
|
||||||
|
```powershell
|
||||||
|
scripts\Windows\run.ps1
|
||||||
|
```
|
||||||
|
- Unix
|
||||||
|
```bash
|
||||||
|
scripts/Unix/run.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Bring to production.
|
||||||
|
|
||||||
|
Include `nginx` file to your nginx configuration, you really want to install and
|
||||||
|
run [Certbot](https://certbot.eff.org/) afterwards!
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
|
@ -58,78 +91,40 @@ cases and learning Django skills. The project is easy to customize, allowing for
|
||||||
|
|
||||||
Don't forget to change the
|
Don't forget to change the
|
||||||
`RUN sed -i 's|https://deb.debian.org/debian|https://ftp.<locale>.debian.org/debian|g' /etc/apt/sources.list.d/debian.sources`
|
`RUN sed -i 's|https://deb.debian.org/debian|https://ftp.<locale>.debian.org/debian|g' /etc/apt/sources.list.d/debian.sources`
|
||||||
|
before running installment scripts
|
||||||
|
|
||||||
### Environment Variables
|
### nginx
|
||||||
|
|
||||||
The project uses environment variables for configuration. Below is an example of the `.env` file:
|
Please comment-out SSL-related lines, then apply needed configurations, run `certbot --cert-only --nginx`,
|
||||||
|
decomment previously commented lines and enjoy eVibes over HTTPS!
|
||||||
|
|
||||||
```plaintext
|
### .env
|
||||||
EVIBES_PROJECT_NAME="eVibes"
|
|
||||||
EVIBES_FRONTEND_DOMAIN="evibes.com"
|
|
||||||
EVIBES_BASE_DOMAIN="evibes.com"
|
|
||||||
SENTRY_DSN=""
|
|
||||||
DEBUG=1
|
|
||||||
|
|
||||||
SECRET_KEY="SUPERSECRETKEY"
|
After .env file generation, you may want to edit some of it's values such as macroservices' API keys, database password,
|
||||||
JWT_SIGNING_KEY="SUPERSECRETJWTSIGNINGKEY"
|
redis password, etc.
|
||||||
|
|
||||||
ALLOWED_HOSTS="evibes.com api.evibes.com b2b.evibes.com"
|
|
||||||
CSRF_TRUSTED_ORIGINS="https://evibes.com https://api.evibes.com https://www.evibes.com https://b2b.evibes.com"
|
|
||||||
CORS_ALLOWED_ORIGINS="https://evibes.com https://api.evibes.com https://www.evibes.com https://b2b.evibes.com"
|
|
||||||
|
|
||||||
POSTGRES_DB="evibes"
|
|
||||||
POSTGRES_USER="evibes_user"
|
|
||||||
POSTGRES_PASSWORD="SUPERSECRETPOSTGRESPASSWORD"
|
|
||||||
|
|
||||||
DBBACKUP_SFTP_HOST="Your SFTP backup host"
|
|
||||||
DBBACKUP_SFTP_USER="The username to use to log in to that host"
|
|
||||||
DBBACKUP_SFTP_PASS="The password to use to log in to that host"
|
|
||||||
|
|
||||||
ELASTIC_PASSWORD="SUPERSECRETELASTICPASSWORD"
|
|
||||||
|
|
||||||
REDIS_PASSWORD="SUPERSECRETREDISPASSWORD"
|
|
||||||
|
|
||||||
CELERY_BROKER_URL="redis://:SUPERSECRETREDISPASSWORD@redis:6379/0"
|
|
||||||
CELERY_RESULT_BACKEND="redis://:SUPERSECRETREDISPASSWORD@redis:6379/0"
|
|
||||||
|
|
||||||
PROMETHEUS_USER="evibes"
|
|
||||||
PROMETHEUS_PASSWORD="SUPERSECRETFLOWERPASSWORD"
|
|
||||||
|
|
||||||
EMAIL_BACKEND="django.core.mail.backends.smtp.EmailBackend"
|
|
||||||
EMAIL_HOST="smtp.whatever.evibes.com"
|
|
||||||
EMAIL_PORT="465"
|
|
||||||
EMAIL_USE_TLS=0
|
|
||||||
EMAIL_USE_SSL=1
|
|
||||||
EMAIL_HOST_USER="your-email-user@whatever.evibes.com"
|
|
||||||
EMAIL_HOST_PASSWORD="SUPERSECRETEMAILHOSTPASSWORD"
|
|
||||||
EMAIL_FROM="your-email-user@whatever.evibes.com"
|
|
||||||
|
|
||||||
COMPANY_NAME="eVibes, Inc."
|
|
||||||
COMPANY_PHONE_NUMBER="+888888888888"
|
|
||||||
COMPANY_ADDRESS="The place that does not exist"
|
|
||||||
|
|
||||||
OPENAI_API_KEY="Haha, really?"
|
|
||||||
ABSTRACT_API_KEY="Haha, really? x2"
|
|
||||||
DEEPL_AUTH_KEY="Haha, really? x3"
|
|
||||||
```
|
|
||||||
|
|
||||||
**Note**: Replace all placeholder values (e.g., `your-secret-key`, `your-database-name`) with your actual configuration.
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Add these lines to your hosts-file to use django-hosts functionality on localhost:
|
- Add needed subdomains to DNS-settings of your domain, those are:
|
||||||
|
|
||||||
|
1. @.your-domain.com
|
||||||
|
2. www.your-domain.com
|
||||||
|
3. api.your-domain.com
|
||||||
|
4. b2b.your-domain.com
|
||||||
|
5. prometheus.your-domain.com
|
||||||
|
|
||||||
|
- Add these lines to your hosts-file to use django-hosts functionality on localhost(*DEVELOPMENT ONLY*):
|
||||||
|
|
||||||
```hosts
|
```hosts
|
||||||
127.0.0.1 api.localhost
|
127.0.0.1 api.localhost
|
||||||
127.0.0.1 b2b.localhost
|
127.0.0.1 b2b.localhost
|
||||||
```
|
```
|
||||||
|
|
||||||
Otherwise, add needed subdomains to DNS-settings of your domain.
|
Once the services are up and running, you can access the application at
|
||||||
|
`http://api.your-domain.com`(http://api.localhost:8000).
|
||||||
|
|
||||||
Once the services are up and running, you can access the application at `http://api.localhost:8000`.
|
- **Django Admin**: `http://api.your-domain.com/` (will redirect to admin)
|
||||||
|
- **API Docs**:
|
||||||
- **Django Admin**: `http://api.localhost:8000/admin/`
|
|
||||||
- **API Endpoints**:
|
|
||||||
- REST API: `http://api.localhost:8000/docs/swagger` or `http://api.localhost:8000/docs/redoc`
|
- REST API: `http://api.localhost:8000/docs/swagger` or `http://api.localhost:8000/docs/redoc`
|
||||||
- GraphQL API: `http://api.localhost:8000/graphql/`
|
- GraphQL API: `http://api.localhost:8000/graphql/`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ while IFS= read -r line; do
|
||||||
printf "%b%s%b\n" "$PURPLE" "$line" "$RESET"
|
printf "%b%s%b\n" "$PURPLE" "$line" "$RESET"
|
||||||
done < "$ART_PATH"
|
done < "$ART_PATH"
|
||||||
|
|
||||||
printf "\n%bby WISELESS TEAM%b\n\n" "$GRAY" "$RESET"
|
printf "\n%b by WISELESS TEAM%b\n\n" "$GRAY" "$RESET"
|
||||||
|
|
||||||
ENV_FILE=".env"
|
ENV_FILE=".env"
|
||||||
if [ ! -f "$ENV_FILE" ]; then
|
if [ ! -f "$ENV_FILE" ]; then
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ while IFS= read -r line; do
|
||||||
printf "%b%s%b\n" "$PURPLE" "$line" "$RESET"
|
printf "%b%s%b\n" "$PURPLE" "$line" "$RESET"
|
||||||
done < "$ART_PATH"
|
done < "$ART_PATH"
|
||||||
|
|
||||||
printf "\n%bby WISELESS TEAM%b\n\n" "$GRAY" "$RESET"
|
printf "\n%b by WISELESS TEAM%b\n\n" "$GRAY" "$RESET"
|
||||||
|
|
||||||
# prompt for a value with default
|
# prompt for a value with default
|
||||||
prompt_default() {
|
prompt_default() {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ while IFS= read -r line; do
|
||||||
printf "%b%s%b\n" "$PURPLE" "$line" "$RESET"
|
printf "%b%s%b\n" "$PURPLE" "$line" "$RESET"
|
||||||
done < "$ART_PATH"
|
done < "$ART_PATH"
|
||||||
|
|
||||||
printf "\n%bby WISELESS TEAM%b\n\n" "$GRAY" "$RESET"
|
printf "\n%b by WISELESS TEAM%b\n\n" "$GRAY" "$RESET"
|
||||||
|
|
||||||
if [ ! -f .env ]; then
|
if [ ! -f .env ]; then
|
||||||
printf "\e[33m.env file not found. Exiting without running Docker steps.\e[0m\n"
|
printf "\e[33m.env file not found. Exiting without running Docker steps.\e[0m\n"
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ while IFS= read -r line; do
|
||||||
printf "%b%s%b\n" "$PURPLE" "$line" "$RESET"
|
printf "%b%s%b\n" "$PURPLE" "$line" "$RESET"
|
||||||
done < "$ART_PATH"
|
done < "$ART_PATH"
|
||||||
|
|
||||||
printf "\n%bby WISELESS TEAM%b\n\n" "$GRAY" "$RESET"
|
printf "\n%b by WISELESS TEAM%b\n\n" "$GRAY" "$RESET"
|
||||||
|
|
||||||
printf "%bStopping services…%b\n" "$CYAN" "$RESET"
|
printf "%bStopping services…%b\n" "$CYAN" "$RESET"
|
||||||
docker compose down --ansi never
|
docker compose down --ansi never
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ while IFS= read -r line; do
|
||||||
printf "%b%s%b\n" "$PURPLE" "$line" "$RESET"
|
printf "%b%s%b\n" "$PURPLE" "$line" "$RESET"
|
||||||
done < "$ART_PATH"
|
done < "$ART_PATH"
|
||||||
|
|
||||||
printf "\n%bby WISELESS TEAM%b\n\n" "$GRAY" "$RESET"
|
printf "\n%b by WISELESS TEAM%b\n\n" "$GRAY" "$RESET"
|
||||||
|
|
||||||
printf "\e[32mVerifying all images are present…\e[0m\n"
|
printf "\e[32mVerifying all images are present…\e[0m\n"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ while IFS= read -r line; do
|
||||||
printf "%b%s%b\n" "$PURPLE" "$line" "$RESET"
|
printf "%b%s%b\n" "$PURPLE" "$line" "$RESET"
|
||||||
done < "$ART_PATH"
|
done < "$ART_PATH"
|
||||||
|
|
||||||
printf "\n%bby WISELESS TEAM%b\n\n" "$GRAY" "$RESET"
|
printf "\n%b by WISELESS TEAM%b\n\n" "$GRAY" "$RESET"
|
||||||
|
|
||||||
printf "%bKilling services…%b\n" "$CYAN" "$RESET"
|
printf "%bKilling services…%b\n" "$CYAN" "$RESET"
|
||||||
docker compose down --ansi never
|
docker compose down --ansi never
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ $art -split "`r?`n" | ForEach-Object {
|
||||||
Write-Host "$purple$_$reset"
|
Write-Host "$purple$_$reset"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "`nby WISELESS TEAM`n" -ForegroundColor Gray
|
Write-Host "`n by WISELESS TEAM`n" -ForegroundColor Gray
|
||||||
|
|
||||||
$Spinner = @('|', '/', '-', '\')
|
$Spinner = @('|', '/', '-', '\')
|
||||||
$Colors = @('White', 'Gray')
|
$Colors = @('White', 'Gray')
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ $art -split "`r?`n" | ForEach-Object {
|
||||||
Write-Host "$purple$_$reset"
|
Write-Host "$purple$_$reset"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "`nby WISELESS TEAM`n" -ForegroundColor Gray
|
Write-Host "`n by WISELESS TEAM`n" -ForegroundColor Gray
|
||||||
|
|
||||||
function Get-RandomHex
|
function Get-RandomHex
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ $art -split "`r?`n" | ForEach-Object {
|
||||||
Write-Host "$purple$_$reset"
|
Write-Host "$purple$_$reset"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "`nby WISELESS TEAM`n" -ForegroundColor Gray
|
Write-Host "`n by WISELESS TEAM`n" -ForegroundColor Gray
|
||||||
|
|
||||||
if (-not (Test-Path '.env'))
|
if (-not (Test-Path '.env'))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ $art -split "`r?`n" | ForEach-Object {
|
||||||
Write-Host "$purple$_$reset"
|
Write-Host "$purple$_$reset"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "`nby WISELESS TEAM`n" -ForegroundColor Gray
|
Write-Host "`n by WISELESS TEAM`n" -ForegroundColor Gray
|
||||||
|
|
||||||
$Spinner = @('|', '/', '-', '\')
|
$Spinner = @('|', '/', '-', '\')
|
||||||
$Colors = @('White', 'Gray')
|
$Colors = @('White', 'Gray')
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ $art -split "`r?`n" | ForEach-Object {
|
||||||
Write-Host "$purple$_$reset"
|
Write-Host "$purple$_$reset"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "`nby WISELESS TEAM`n" -ForegroundColor Gray
|
Write-Host "`n by WISELESS TEAM`n" -ForegroundColor Gray
|
||||||
|
|
||||||
Write-Host "Verifying all images are present…" -ForegroundColor Green
|
Write-Host "Verifying all images are present…" -ForegroundColor Green
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ $art -split "`r?`n" | ForEach-Object {
|
||||||
Write-Host "$purple$_$reset"
|
Write-Host "$purple$_$reset"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "`nby WISELESS TEAM`n" -ForegroundColor Gray
|
Write-Host "`n by WISELESS TEAM`n" -ForegroundColor Gray
|
||||||
|
|
||||||
$Spinner = @('|', '/', '-', '\')
|
$Spinner = @('|', '/', '-', '\')
|
||||||
$Colors = @('White', 'Gray')
|
$Colors = @('White', 'Gray')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue