-
Notifications
You must be signed in to change notification settings - Fork 1
Deployment guide
This document outlines the steps necessary to deploy the project on a Windows environment, with or without using our Docker images. The project consists of a Django backend, a Vue.js frontend using Vite, and PostgreSQL as the database.
If you wish to use our images, then it is as simple as installing Docker and running this command :
docker compose up
For users who wish to avoid Docker, continue reading this guide.
Before you start, ensure you have the following installed on your machine:
Python (3.8 or later)
Node.js (14.x or later)
PostgreSQL (12.x or later)
Git
First, clone the project repository from GitHub to your local machine.
git clone https://github.com/HE-Arc/neurona.git
cd neurona
Download and install Python from python.org.
Navigate to the project's root directory in your terminal and run the following commands:
pip install pipenv
pipenv install
pipenv shell
python manage.py migrate
Download and install PostgreSQL from PostgreSQL official site.
Open the PostgreSQL command line client, psql, and run:
sql
CREATE DATABASE neuronaApp;
CREATE USER admin WITH PASSWORD 'yourpassword';
GRANT ALL PRIVILEGES ON DATABASE neuronaApp TO admin;
Open the Django project's settings file (settings.py) and configure the DATABASES setting:
python
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'neuronaApp',
'USER': 'admin',
'PASSWORD': 'yourpassword',
'HOST': 'localhost',
'PORT': '', # Default is 5432
}
}
Generate the database schema by running these commands:
python manage.py makemigrations
python manage.py migrate
Download and install Node.js from Node.js official site.
Navigate to the directory containing the Vue project (frontend folder) and install the necessary packages:
cd frontend
npm install
In the directory of the Django project, activate the virtual environment if it's not already activated and run:
python manage.py runserver
Open a new command line window, navigate to the Vue project directory, and run:
npm run dev
This will start the Vite development server, usually accessible via http://localhost:3000.
With both servers running, you can access the frontend of your application by opening http://localhost:3000 in a web browser. The backend will be accessible via http://localhost:8000.