version 2.0 | refactor

changed structure of codebase. also include docker files for easy deployment
This commit is contained in:
2025-12-03 15:07:36 -07:00
parent 456d486d39
commit a709c80f38
21 changed files with 2532 additions and 81535 deletions

45
docker-compose.yaml Normal file
View File

@@ -0,0 +1,45 @@
version: '3.9'
services:
uta-mysql:
image: mysql:8.0
container_name: uta-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: uta123
MYSQL_DATABASE: uta
MYSQL_USER: uta
MYSQL_PASSWORD: uta123
command: --default-authentication-plugin=mysql_native_password
volumes:
- mysql_data:/var/lib/mysql
- ./init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-puta", "--password=uta123"]
interval: 10s
timeout: 5s
retries: 5
uta-sync:
build: .
container_name: uta-sync
ports:
- "1001:1001"
restart: unless-stopped
environment:
- DATABASE_URL=mysql://uta:uta123@uta-mysql:3306/uta
- HEALTH_PORT=3000
- NODE_ENV=production
depends_on:
uta-mysql:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--spider", "http://localhost:3000/health"]
interval: 30s
timeout: 15s
retries: 3
volumes:
mysql_data: