- Added backend package.json with dependencies for Express, MySQL, and EJS. - Created server.js for backend server setup with basic routing and error handling. - Added EJS view for the index page. - Set up Docker Compose configuration for frontend, backend, and MySQL database services. - Created Dockerfile for frontend build process using Node and Nginx. - Configured Nginx for serving frontend application. - Implemented i18n setup for internationalization with English and German language support. - Added localization files for English and German languages.
38 lines
785 B
YAML
38 lines
785 B
YAML
services:
|
|
frontend:
|
|
container_name: ca-lose-frontend
|
|
build: ./frontend
|
|
ports:
|
|
- "8002:80"
|
|
restart: unless-stopped
|
|
|
|
backend:
|
|
container_name: ca-lose-backend
|
|
build: ./backend
|
|
ports:
|
|
- "8004:8004"
|
|
environment:
|
|
NODE_ENV: production
|
|
DB_HOST: ca-lose
|
|
DB_USER: root
|
|
DB_PASSWORD: ${DB_PASSWORD}
|
|
DB_NAME: ca-lose
|
|
depends_on:
|
|
- ca-lose
|
|
restart: unless-stopped
|
|
|
|
database:
|
|
container_name: ca-lose
|
|
image: mysql:8.0
|
|
restart: unless-stopped
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
|
|
MYSQL_DATABASE: ca-lose
|
|
TZ: Europe/Berlin
|
|
volumes:
|
|
- ca-lose_mysql:/var/lib/mysql
|
|
- ./mysql-timezone.cnf:/etc/mysql/conf.d/timezone.cnf:ro
|
|
|
|
volumes:
|
|
ca-lose_mysql:
|