mirror of
https://github.com/MikroWizard/docker-compose-deployment.git
synced 2025-07-24 04:44:25 +02:00
feat: Initial commit 🎉
Set up the foundational structure for the MikroWizard deployment repository, including: - Docker Compose configuration for MikroFront, MikroMan, PostgreSQL, and Redis Stack. - `prepare.sh` script for host environment preparation. - Database initialization script (`init-db.sql`). - `.env` template for centralized configuration. This commit marks the beginning of a streamlined deployment process for MikroWizard!
This commit is contained in:
commit
a8f029ee38
80 changed files with 3429 additions and 0 deletions
69
docker-compose.yml
Normal file
69
docker-compose.yml
Normal file
|
@ -0,0 +1,69 @@
|
|||
|
||||
version: '3.9'
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:latest
|
||||
container_name: postgres
|
||||
environment:
|
||||
POSTGRES_USER: ${MW_DB_USER}
|
||||
POSTGRES_PASSWORD: ${MW_DB_PASSWORD}
|
||||
POSTGRES_DB: ${MW_DB_NAME}
|
||||
PGUSER: ${MW_DB_USER}
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
- ./init-db.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready -q -U ${MW_DB_USER} -d ${MW_DB_NAME}" ]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 50
|
||||
|
||||
redis:
|
||||
image: redis/redis-stack-server:latest
|
||||
ports:
|
||||
- "6379:6379"
|
||||
|
||||
mikroman:
|
||||
build:
|
||||
context: ./mikroman
|
||||
dockerfile: Dockerfile
|
||||
network_mode: "host"
|
||||
entrypoint: bash -c "cd /app && ./init.sh"
|
||||
environment:
|
||||
- MW_SERVER_IP=${MW_SERVER_IP}
|
||||
- MW_RAD_SECRET=${MW_RAD_SECRET}
|
||||
- MW_DB_PASSWORD=${MW_DB_PASSWORD}
|
||||
- MW_DB_USER=${MW_DB_USER}
|
||||
- MW_DB_NAME=${MW_DB_NAME}
|
||||
- MW_encryptKey=${MW_encryptKey}
|
||||
volumes:
|
||||
- ${CONF_PATH}:/conf
|
||||
- ${FIRMWARE_PATH}:/conf/firmware
|
||||
- ${BACKUPS_PATH}:/conf/backups
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
env_file: .env
|
||||
|
||||
|
||||
|
||||
mikrofront:
|
||||
build:
|
||||
context: ./mikrofront
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./mikrofront/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
- ${CONF_PATH}:/conf
|
||||
depends_on:
|
||||
- mikroman
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
volumes:
|
||||
db_data:
|
Loading…
Add table
Add a link
Reference in a new issue