Install local environment – CachyOS

Here is how you install local environment for peviitor.ro


Preconditions

Make sure you have installed:

  • git

  • github Desktop

  • docker

Steps to install

  • Create directory if it doesn’t exist
mkdir -p ~/peviitor
Enter fullscreen mode
Exit fullscreen mode
  • Clone repositories
git clone https://github.com/peviitor-ro/solr.git ~/peviitor/solr
git clone https://github.com/peviitor-ro/api.git ~/peviitor/api
Enter fullscreen mode
Exit fullscreen mode
  • replace < your-username > with your linux username
sudo chmod -R a+rwx /home/<your-username>/peviitor/solr
Enter fullscreen mode
Exit fullscreen mode
  • stop apache-container
docker stop apache-container
docker rm apache-container
Enter fullscreen mode
Exit fullscreen mode
  • stop solr-container
docker stop solr-container
docker rm solr-container
Enter fullscreen mode
Exit fullscreen mode
  • stop data-migration container
docker stop data-migration
docker rm data-migration
Enter fullscreen mode
Exit fullscreen mode
  • create subnetwork mynetwork
sudo docker network create --subnet=172.18.0.0/16 mynetowork
Enter fullscreen mode
Exit fullscreen mode
  • replace < your-username > with your linux username
docker run --name apache-container --network mynetwork --ip 172.18.0.11 -d -p 8080:80 -v /home/<your-username>/peviitor:/var/www/html sebiboga/php-apache:1.0.0
Enter fullscreen mode
Exit fullscreen mode
  • replace < your-username > with your linux username
docker run --name solr-container --network mynetwork --ip 172.18.0.10 -d -p 8983:8983 -v "/home/<your-username>/peviitor/solr/core/data:/var/solr/data" sebiboga/peviitor:1.0.0
Enter fullscreen mode
Exit fullscreen mode
  • wait for solr-container to start

  • run data-migration container

docker run --name data-migration --network mynetwork --ip 172.18.0.12 --rm sebiboga/peviitor-data-migration-local:latest
Enter fullscreen mode
Exit fullscreen mode
  • remove the image data-migration
docker rmi sebiboga/peviitor-data-migration-local:latest
Enter fullscreen mode
Exit fullscreen mode

Test the environment in browser:

http://localhost:8983/
http://localhost/8080/api/v0/random/


Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top
Our affordable cloud storage services are designed to provide high quality solutions without breaking the bank. Privacy, cookie & data policy.