DEV Community

Cover image for Install local environment - CachyOS
Boga Sebastian Nicolae
Boga Sebastian Nicolae

Posted on • Updated on

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 mynetwork
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/

Top comments (2)

Collapse
 
sebiboga profile image
Boga Sebastian Nicolae

for Raspberry Pi 400 - arm64

sudo docker run --name solr-container --network mynetwork --ip 172.18.0.10 -d -p 8983:8983 -v "/home/sebi/peviitor/solr/core/data:/var/solr/data" solr:latest

Enter fullscreen mode Exit fullscreen mode
Collapse
 
sebiboga profile image
Boga Sebastian Nicolae • Edited

for Raspberry Pi 400 - arm64

sudo docker run --name apache-container --network mynetwork --ip 172.18.0.11 -d -p 8080:80 -v /home/sebi/peviitor:/var/www/html sebiboga/php-apache:arm64
Enter fullscreen mode Exit fullscreen mode