Skip to content

coding-rodents/hive-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hive-backend

Backend of the Hive application.

Configuration details

Component Version
Java 21-temurin
Spring Boot 3.3.5
Postgres 16.4
Dev Container OS Debian Bookworm

Development

This project has been prepared to be worked on inside a Dev Container.

Prerequisites

  1. Docker / Docker Desktop, depending on the OS.
  2. Compatible IDE:
    • Visual Studio Code with Dev Containers extension
    • IntelliJ IDEA Ultimate, at least 2024.x.x (compose support is necessary)

Setup

Before anything - create a .env file in the .devcontainer/ directory, based on the .env.template file. The Dev Container won't start up without that.

Visual Studio Code

  1. Make sure Docker is running!
  2. Open the hive/ project directory in the IDE.
  3. A prompt asking if you want to open the folder in a Dev Container should pop up. Reopen the folder inside a Dev Container. If the notification won't show up, open the command palette and run the Dev Containers: Reopen in Container command.

First startup will be slow, because Docker will build the image, and then spin up the containers. After the IDE connects to the container, Java extension should start configuring the project. Be prepared, this takes a while, depending on the internet and filesystem I/O speed, because Gradle will resolve all dependencies. After this finishes, you should be good to go!

Sometimes Java Extension is lazy and doesn't resolve all dependencies straight away, so if you encounter weird issues, first time you launch the Spring application - open the Java Projects section in the Explorer view, right-click the hive project and then select Rebuild Project.

Finally, check Git repository trust section for configuring git inside the Dev Container.

IntelliJ IDEA

  1. Make sure Docker is running!
  2. In the main menu, select Remote Development $\rightarrow$ Dev Containers.
  3. Click New Dev Container.
  4. Choose From Local Project, Docker, IntelliJ IDEA and set the path to the devcontainer.json file that's in the hive/ project directory.
  5. Click Build Container and Continue.

There will probably be a pop up about JetBrains EAP first time the Dev Container is configured. Accept and continue. After the IDE is set up, Gradle will resolve the dependencies. When opening the project again later, open it from the Remote Development $\rightarrow$ Dev Containers tab, you can also manage the Dev Container there.

Finally, check Git repository trust section for configuring git inside the Dev Container.

Git repository trust

You can normally manage the repository from your host machine, but it is convenient to be able to do that from the level of the IDE. There are some issues with that and some steps need to be taken.

After the Dev Container is created and the IDE is ready - to be able to monitor the changes in the repo from inside the container, you need to mark the repository as trusted. To do this, open a terminal in the IDE inside the Dev Container and run the following command:

git config --global --add safe.directory /workspaces/hive-backend

After that, the IDE should pick up the repo configuration. If it doesn't, try restarting the IDE.

About

Backend of the Hive application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •  

Languages