Is a final project of UOC informatics engineering degree. About web development, this repository is for build docker environment to execute backend of project.
To get a local copy up and running follow these simple steps.
This is an example of how to list things you need to use the software and how to install them.
- docker
- Mac OS X
brew cask install docker
- Linux
sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io
- Windows
- Download and execute docker installer
- Mac OS X
-
Git clone
cd ~/ git clone https://github.com/imollm/homeweb-backend
-
Build and deploy
cd ~/homeweb-backend docker-compose up -d
-
Execute init script
docker ps
Copy CONTAINER ID of homeweb-backend_webserver
docker exec -it <CONTAINER_ID> sh /var/www/html/deploy/init.sh
This install dependencies and init database, with test data.
-
Test with curl
curl -I http://localhost:8080/homeweb-backend/public/api/properties/index HTTP/1.1 200 OK Date: Mon, 17 May 2021 15:11:59 GMT Server: Apache/2.4.38 (Debian) X-Powered-By: PHP/8.0.3 Cache-Control: no-cache, private X-RateLimit-Limit: 60 X-RateLimit-Remaining: 59 Access-Control-Allow-Origin: * Content-Type: application/json
-
Test with Postman project
-
Download postman collection
wget -O ~/tfg-docker-backend/postman.json https://www.getpostman.com/collections/c02928439a50147cc744
4.3 Open with postman and test it.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License.
Ivan Moll Moll - imollm@uoc.edu
Project Link: https://github.com/imollm/homeweb-backend