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
- Clone repositories
git clone https://github.com/peviitor-ro/solr.git ~/peviitor/solr
git clone https://github.com/peviitor-ro/api.git ~/peviitor/api
- replace < your-username > with your linux username
sudo chmod -R a+rwx /home/<your-username>/peviitor/solr
- stop apache-container
docker stop apache-container
docker rm apache-container
- stop solr-container
docker stop solr-container
docker rm solr-container
- stop data-migration container
docker stop data-migration
docker rm data-migration
- create subnetwork mynetwork
sudo docker network create --subnet=172.18.0.0/16 mynetowork
- 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
- 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
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
- remove the image data-migration
docker rmi sebiboga/peviitor-data-migration-local:latest
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.