No description
Find a file
2025-04-28 09:55:35 -07:00
assignment-db-service added docker file 2025-04-28 09:53:22 -07:00
assignment-service added docker file 2025-04-28 09:53:22 -07:00
auth-service added docker file 2025-04-28 09:53:22 -07:00
battlesnake-service add files 2025-04-14 16:41:51 -07:00
database-service git ignore update 2025-04-21 17:48:58 -07:00
flypostgres initial commit 2025-01-07 04:45:03 -08:00
frontend-service git ignore update 2025-04-21 17:48:58 -07:00
gameboard-service added gameboard 2025-04-22 11:59:50 -07:00
go initial commit 2025-01-07 04:45:03 -08:00
lsp-service initial commit 2025-01-07 04:45:03 -08:00
manager-service git ignore update 2025-04-21 17:48:58 -07:00
simple add files 2025-04-14 16:41:51 -07:00
testing added gameboard 2025-04-21 13:46:52 -07:00
trolling-service initial commit 2025-01-07 04:45:03 -08:00
uploader-service git ignore update 2025-04-21 17:48:58 -07:00
user-db-service added docker file 2025-04-28 09:53:22 -07:00
.dockerignore added docker file 2025-04-28 09:53:22 -07:00
.gitignore update git ignore 2025-04-25 13:56:35 -07:00
compose.yaml added docker file 2025-04-28 09:53:22 -07:00
README.md added docker file 2025-04-28 09:53:22 -07:00

Running the Project with Docker

This project consists of four services, each with its own Dockerfile and environment configuration. All services are orchestrated using Docker Compose for local development and testing.

Project-Specific Requirements

  • Node.js Version: All services use Node.js 22.13.1-slim (set via ARG NODE_VERSION=22.13.1 in Dockerfiles).
  • System Dependencies:
    • openssl is installed in the database services for Prisma and bcrypt support.
  • Non-root Users: All containers run as non-root users for improved security.

Environment Variables

  • Each service requires its own .env file, referenced in the docker-compose.yml via the env_file directive:
    • ./assignment-db-service/.env
    • ./assignment-service/.env
    • ./auth-service/.env
    • ./user-db-service/.env
  • Ensure these files are present and populated with the required variables before starting the services.

Build and Run Instructions

  1. Clone the repository and ensure all subdirectories and .env files are present.
  2. Build and start all services:
    docker compose up --build
    
    This will build all images and start the containers as defined in docker-compose.yml.

Service Ports

  • assignment-db-service:
    • Exposes port 3000 (host: 3000 → container: 3000)
  • assignment-service:
    • Exposes port 8080 (host: 8080 → container: 8080)
  • auth-service:
    • Exposes port 8081 (host: 8081 → container: 8080)
  • user-db-service:
    • Exposes port 3001 (host: 3001 → container: 3000)

Special Configuration

  • All services are connected to a shared Docker network named backend for internal communication.
  • The assignment-service depends on assignment-db-service and will wait for it to be available before starting.
  • Prisma client is generated during the build process for database services.

Ensure you have Docker and Docker Compose installed on your system before proceeding.