- Created SQL script to set up database tables for projects and technologies. - Added Docker Compose configuration for application and MySQL service. - Implemented API endpoints for CRUD operations on technologies. - Defined data types for projects and technologies. - Established routing for API endpoints.
30 lines
639 B
YAML
30 lines
639 B
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "3000:3000"
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
- db
|
|
command: ["sh", "-c", "sleep 6 && ./main"]
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: mysql:8.0
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
|
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
|
MYSQL_USER: ${MYSQL_USER}
|
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
|
volumes:
|
|
- db_data:/var/lib/mysql
|
|
- ./create_table.sql:/docker-entrypoint-initdb.d/create_table.sql:ro
|
|
ports:
|
|
- "3306:3306"
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
db_data: |