Skip to content
Pedro Giampietro edited this page Sep 21, 2023 · 12 revisions

Database

In order to use the website with full features, you need to set up database server.

To do so, you have two options:

  1. https://www.apachefriends.org/index.html
  2. https://www.wampserver.com/en/download-wampserver-64bits/

Steps to configure this project with one of the apps from above

  • Set up .env file to use your database credentials (connection string)

Navigate to shibaac project directory and execute following commands to set up database:

npx prisma db push

Seed the database (OPTIONAL)

npx prisma db seed 

Development

First clone repository:

git clone https://github.com/nekiro/shibaac.git

Download Node.js https://nodejs.org/en/download/

Install dependencies:

cd shibaac
npm i

Adjust .env located at root of the project and then run local development server

npm run dev

Development Docker Setup

Docker is a containerization tool that allows you to package up an application and its dependencies in a standardized way for software development. This is ideal for development, testing, and production stages as it ensures consistent environment setups.

Database with Docker Instead of manually setting up a database with services like XAMPP or WAMP, you can utilize Docker to streamline the setup. This is particularly beneficial because it ensures everyone on the team is using the exact same environment configuration, eliminating the "works on my machine" problem.

Steps: Install Docker

Before you start, you need to have Docker installed on your machine. Download it from Docker's official website.

Setup Database

This will pull the MySQL 5.7 image, and start the database with the settings you've defined in the docker-compose.yml and .env file.

Initialize and Seed Database with Docker

To setup and seed the database:

docker-compose up -d

Once you've set up your database with Docker, you can also run the entire development environment inside a Docker container. This will start the development server inside a Docker container, ensuring all dependencies and environment configurations are consistent across all developer setups.

Access the Development Server

Open http://localhost:3000 with your browser to see the result.

Stopping the Development Server

To stop the server and associated services:

docker-compose down

Note: When using Docker, make sure you've adjusted the .env file accordingly to match the database host, user, and password to the Docker setup (usually host will be the service name from docker-compose, in this case database).##

Production

Too early for that :)

Clone this wiki locally