Skip to content

Sample devops repository with php, mongodb & mysql running on docker-compose

License

Notifications You must be signed in to change notification settings

kar0v/sample_devops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This is a sample repository made to showcase different setup in docker environments, mainly with php:7.0.33 (latest version of php 7)

How to use

Linux:

docker-compose --profile prod up -d for the production environment with xdebug turned on
docker-compose --profile dev up -d for the dev environment with xdebug turned off.

Then open a browser window and type in the addressbar either localhost or 127.0.0.1

Windows:

Check the Windows branch

Mac:

Should be similar to windows, but I don't have a machine to test it on. network_mode: host works only on linux and should be changed respectively.

Note:

As I did not have much experience with PHP, I created the containers at first, but could not initially create the proper functions and connections. This is why I've created a separate python container that runs a script, which queries both databases. The logs of the container can be viewed with docker logs sample_devops_python_1. This is not required at the moment, as I have invested more time into this and the webpage is now working. Also this has been moved to the python branch.

TO DO:

  • Push images to registry
  • Create a helmchart to deploy on k8s.
    • Update secrets for mongodb before building the image or use the two-step building approach.

About

Sample devops repository with php, mongodb & mysql running on docker-compose

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published