guoyujing 92e5cdf530 docker scripts 3 luni în urmă
..
.env.example 92e5cdf530 docker scripts 3 luni în urmă
README.md 92e5cdf530 docker scripts 3 luni în urmă
backend-entrypoint.sh 92e5cdf530 docker scripts 3 luni în urmă
backend.Dockerfile 92e5cdf530 docker scripts 3 luni în urmă
docker-compose.prod.yml 92e5cdf530 docker scripts 3 luni în urmă
docker-compose.yml 92e5cdf530 docker scripts 3 luni în urmă
docker_build.sh 92e5cdf530 docker scripts 3 luni în urmă
frontend.Dockerfile 92e5cdf530 docker scripts 3 luni în urmă
nginx-https.conf 92e5cdf530 docker scripts 3 luni în urmă
nginx.conf 92e5cdf530 docker scripts 3 luni în urmă

README.md

Docker Compose

Production-style local stack for Aitori Stylist.

Run

cd docker
cp .env.example .env
docker compose up --build

Open:

If port 8080 is already in use:

FRONTEND_PORT=8081 docker compose up --build

Default initial login:

  • Email: stylist@example.com
  • Password: Passw0rd!

Notes

  • MySQL and Redis are only exposed inside the compose network.
  • Backend runs prisma migrate deploy before startup.
  • The initial login account is seeded idempotently after migrations.
  • Demo seed currently does not insert any data and can be skipped with SEED_DEMO_DATA=false.
  • If Docker Hub is slow or blocked, edit NODE_IMAGE and NGINX_IMAGE in .env to point at your registry mirror.

Build And Push Images

Login to GHCR first:

echo <GHCR_TOKEN> | docker login ghcr.io -u gyj2032-byte --password-stdin

Build Linux images and push them to ghcr.io/gyj2032-byte:

./docker_build.sh
./docker_build.sh v1.0.0

Defaults:

  • Registry: ghcr.io/gyj2032-byte
  • Images: stylist-backend, stylist-frontend
  • Platform: linux/amd64
  • Tag: current git short SHA, plus latest

Override examples:

PLATFORM=linux/arm64 ./docker_build.sh v1.0.0
REGISTRY=ghcr.io/gyj2032-byte IMAGE_PREFIX=stylist ./docker_build.sh

Production Compose

Run the published GHCR images without building from source:

cd docker
cp .env.prod.example .env
IMAGE_TAG=latest docker compose -f docker-compose.prod.yml pull
IMAGE_TAG=latest docker compose -f docker-compose.prod.yml up -d

Use a specific pushed tag:

IMAGE_TAG=v1.0.0 docker compose -f docker-compose.prod.yml up -d

HTTPS Nginx

Keep TLS on the host Nginx and proxy to the frontend container port:

sudo cp nginx.conf /etc/nginx/conf.d/stylist.agigo.cloud.conf
sudo nginx -t
sudo systemctl reload nginx

If FRONTEND_PORT is not 8080, update proxy_pass in nginx.https.example.conf to match it.

Reset Data

cd docker
docker compose down -v
docker compose up --build