mirror of
https://github.com/hhftechnology/Marketplace.git
synced 2026-03-11 17:48:13 -05:00
new-template
This commit is contained in:
15
compose-files/services/nginx/.env
Normal file
15
compose-files/services/nginx/.env
Normal file
@@ -0,0 +1,15 @@
|
||||
# .env file for nginx service
|
||||
# Make sure you have updated/checked the .env file with the correct variables.
|
||||
# All the need to be defined here.
|
||||
|
||||
# Service Configuration
|
||||
SERVICE=nginx
|
||||
IMAGE_URL=nginx:latest
|
||||
SERVICEPORT=80
|
||||
|
||||
# Template Variables
|
||||
MAIN_DOMAIN=example.com
|
||||
NGINX_PORT=80
|
||||
|
||||
# DNS Configuration
|
||||
DNS_SERVER=9.9.9.9
|
||||
15
compose-files/services/nginx/.env.example
Normal file
15
compose-files/services/nginx/.env.example
Normal file
@@ -0,0 +1,15 @@
|
||||
# .env file for nginx service
|
||||
# Make sure you have updated/checked the .env file with the correct variables.
|
||||
# All the ${ xx } need to be defined here.
|
||||
|
||||
# Service Configuration
|
||||
SERVICE=nginx
|
||||
IMAGE_URL=nginx:latest
|
||||
SERVICEPORT=80
|
||||
|
||||
# Template Variables
|
||||
MAIN_DOMAIN=example.com
|
||||
NGINX_PORT=80
|
||||
|
||||
# DNS Configuration
|
||||
DNS_SERVER=9.9.9.9
|
||||
32
compose-files/services/nginx/README.md
Normal file
32
compose-files/services/nginx/README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Nginx Service
|
||||
|
||||
A lightweight and high-performance web server and reverse proxy.
|
||||
|
||||
## Features
|
||||
|
||||
- HTTP/HTTPS web server
|
||||
- Reverse proxy capabilities
|
||||
- Load balancing
|
||||
- SSL/TLS termination
|
||||
|
||||
## Configuration
|
||||
|
||||
1. Copy `.env.example` to `.env` and update the variables
|
||||
2. Update the `template.toml` if using template variables
|
||||
3. Customize nginx configuration in the mounted volume
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
## Ports
|
||||
|
||||
- `80`: HTTP port (configurable via `NGINX_PORT`)
|
||||
|
||||
## Environment Variables
|
||||
|
||||
- `NGINX_HOST`: Domain name for the nginx server
|
||||
- `NGINX_PORT`: Port number for HTTP (default: 80)
|
||||
|
||||
14
compose-files/services/nginx/docker-compose.yml
Normal file
14
compose-files/services/nginx/docker-compose.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
# nginx service
|
||||
# Image: nginx:latest
|
||||
services:
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
container_name: nginx
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${NGINX_PORT:-80}:80" # HTTP port
|
||||
volumes:
|
||||
- ./config:/etc/nginx/conf.d # Nginx configuration
|
||||
environment:
|
||||
- NGINX_HOST=${NGINX_HOST}
|
||||
- NGINX_PORT=${NGINX_PORT}
|
||||
44
compose-files/services/nginx/template.toml
Normal file
44
compose-files/services/nginx/template.toml
Normal file
@@ -0,0 +1,44 @@
|
||||
[variables]
|
||||
main_domain = "${domain}"
|
||||
nginx_port = "80"
|
||||
|
||||
[config]
|
||||
[[config.domains]]
|
||||
serviceName = "nginx"
|
||||
port = 80
|
||||
host = "${main_domain}"
|
||||
path = "/"
|
||||
|
||||
[config.env]
|
||||
NGINX_HOST = "${main_domain}"
|
||||
NGINX_PORT = "${nginx_port}"
|
||||
|
||||
[[config.mounts]]
|
||||
filePath = "/etc/nginx/nginx.conf"
|
||||
content = """
|
||||
# Custom nginx config
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
error_log /var/log/nginx/error.log;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name ${main_domain};
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
15
compose-files/services/redis/.env.example
Normal file
15
compose-files/services/redis/.env.example
Normal file
@@ -0,0 +1,15 @@
|
||||
# .env file for redis service
|
||||
# Make sure you have updated/checked the .env file with the correct variables.
|
||||
# All the ${ xx } need to be defined here.
|
||||
|
||||
# Service Configuration
|
||||
SERVICE=redis
|
||||
REDIS_PORT=6379
|
||||
REDIS_INSIGHT_PORT=8001
|
||||
|
||||
# Template Variables
|
||||
MAIN_DOMAIN=example.com
|
||||
REDIS_PASSWORD=your_secure_password_here
|
||||
|
||||
# DNS Configuration
|
||||
DNS_SERVER=9.9.9.9
|
||||
44
compose-files/services/redis/README.md
Normal file
44
compose-files/services/redis/README.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Redis Service
|
||||
|
||||
An in-memory data structure store, used as a database, cache, and message broker.
|
||||
|
||||
## Features
|
||||
|
||||
- In-memory data storage
|
||||
- Data persistence with AOF (Append Only File)
|
||||
- Redis Insight web UI for monitoring and management
|
||||
- High-performance caching
|
||||
|
||||
## Configuration
|
||||
|
||||
1. Copy `.env.example` to `.env` and update the variables
|
||||
2. Set a secure `REDIS_PASSWORD` for production use
|
||||
3. Update the `template.toml` if using template variables
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
## Ports
|
||||
|
||||
- `6379`: Redis server port (configurable via `REDIS_PORT`)
|
||||
- `8001`: Redis Insight web UI port (configurable via `REDIS_INSIGHT_PORT`)
|
||||
|
||||
## Environment Variables
|
||||
|
||||
- `REDIS_PORT`: Redis server port (default: 6379)
|
||||
- `REDIS_INSIGHT_PORT`: Redis Insight web UI port (default: 8001)
|
||||
- `REDIS_PASSWORD`: Password for Redis authentication (optional but recommended)
|
||||
|
||||
## Access
|
||||
|
||||
- Redis CLI: `redis-cli -h localhost -p 6379`
|
||||
- Redis Insight: `http://localhost:8001` or `http://${MAIN_DOMAIN}/redis`
|
||||
|
||||
## Volumes
|
||||
|
||||
- `redis_volume_data`: Persistent storage for Redis data
|
||||
- `redis_insight_volume_data`: Persistent storage for Redis Insight data
|
||||
|
||||
27
compose-files/services/redis/docker-compose.yml
Normal file
27
compose-files/services/redis/docker-compose.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
# redis service
|
||||
# Image: redis:6.0.7
|
||||
services:
|
||||
redis:
|
||||
image: redis:6.0.7
|
||||
container_name: redis
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redis_volume_data:/data # Redis data persistence
|
||||
ports:
|
||||
- "${REDIS_PORT:-6379}:6379" # Redis default port
|
||||
environment:
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
|
||||
command: redis-server --appendonly yes
|
||||
redis_insight:
|
||||
image: redislabs/redisinsight:1.14.0
|
||||
container_name: redis_insight
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${REDIS_INSIGHT_PORT:-8001}:8001" # Redis Insight web UI
|
||||
volumes:
|
||||
- redis_insight_volume_data:/db # Redis Insight data
|
||||
|
||||
volumes:
|
||||
redis_volume_data:
|
||||
redis_insight_volume_data:
|
||||
|
||||
18
compose-files/services/redis/template.toml
Normal file
18
compose-files/services/redis/template.toml
Normal file
@@ -0,0 +1,18 @@
|
||||
[variables]
|
||||
main_domain = "${domain}"
|
||||
redis_port = "6379"
|
||||
redis_insight_port = "8001"
|
||||
redis_password = "${redis_password}"
|
||||
|
||||
[config]
|
||||
[[config.domains]]
|
||||
serviceName = "redis_insight"
|
||||
port = 8001
|
||||
host = "${main_domain}"
|
||||
path = "/redis"
|
||||
|
||||
[config.env]
|
||||
REDIS_PORT = "${redis_port}"
|
||||
REDIS_INSIGHT_PORT = "${redis_insight_port}"
|
||||
REDIS_PASSWORD = "${redis_password}"
|
||||
|
||||
Reference in New Issue
Block a user