S
S
sokolnikov2015-05-11 19:31:42
PHP
sokolnikov, 2015-05-11 19:31:42

How to use docker to develop and deploy a web application stored on bitbucket?

There is some application in PHP, the source code of which is stored in a private bitbucket repository. Various modules are pulled up via composer.
Usually deployment to production took place in several steps:
- installation of the necessary software (php, apache, etc.);
- setting up the environment (host in apache, configuring php.ini, etc.);
- getting the code from the repository (git clone);
- pulling up the necessary modules (composer install).
Often the first two points took a lot of time due to different version dependencies, compatibility, etc. It was decided to automate the process using Docker.
Having dealt with the docker, I made two images for myself:
1 image with the OS I need, and with the installed software of the required versions;
2, the image is built on the basis of the first one and contains the configuration of the server software (configs with virtual hosts are pulled up, changes are made to php.ini, system users are created).
Now here's the question. How to use the existing image to create a container based on it to deploy the application itself (in order to run git clone inside, given that the repository is closed and you will need to log in; and then composer install)? How to automate this process so that after each commit you do not kill the container with your hands, and do not start a new one, in which you will have to re-pull the sources and necessary modules?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
smanioso, 2015-05-11
@sokolnikov

You can pull sources from the repository without authorization in this way: https://confluence.atlassian.com/display/BITBUCKET...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question