This project is a DevOps implementation of a PHP-based weather forecast application. It demonstrates a complete build and deployment cycle using Docker, Docker Compose, Traefik, and PHP-FPM. The application is orchestrated using GitLab CI, incorporating a custom Docker registry for efficient image management.
Clone the repository: git clone https://gitlab.com/amialex/go-digital-weather-forecast.git cd go-digital-weather-forecast
Set up environment variables:
Create a .env file in the root directory with the following content:
Build and start the containers: docker-compose up -d --build
Access the application at https://scorpiox.io
The CI/CD pipeline is defined in .gitlab-ci.yml and consists of three stages:
The project uses GitLab's built-in container registry. The Docker image is built and pushed to the private registry:
registry.gitlab.com/amialex/go-digital-weather-forecast/php-app
Deployment is automated through the GitLab CI/CD pipeline. When changes are pushed to the dev branch, the pipeline will:
To get weather data for a specific city, make a GET request to: https://scorpiox.io/?city=CityName
The Traefik dashboard is accessible at https://traefik.scorpiox.io (login required)
acme.json file has the correct permissions (600).