Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sergk/dev-tool
dev environment in docker containers (php, nginx, memcache, redis, sphinx, etc)
https://github.com/sergk/dev-tool
Last synced: 3 months ago
JSON representation
dev environment in docker containers (php, nginx, memcache, redis, sphinx, etc)
- Host: GitHub
- URL: https://github.com/sergk/dev-tool
- Owner: SergK
- Created: 2016-08-15T19:23:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-21T06:31:02.000Z (8 months ago)
- Last Synced: 2024-10-10T14:19:48.644Z (3 months ago)
- Language: Shell
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
Description
===========This tool provides number of microservices implemented in docker environment:
* nginx
* php-fpm
* memcached
* mariadb (mysql)
* sphinx
* redisAll the above microservices are based on debian:jessie
How-to use
==========* All the services are managed by docker-compose
* All persistent data is stored on your host in /srv directory:- /srv/logs - nginx logs
- /srv/mysql - database
- /srv/www - www-dataSystem Requirements
-------------------* Docker >= 1.12
* Ansible 2.1Initial configuration
---------------------.. code-block:: bash
# Install required packages
sudo apt-get install libffi-dev libssl-dev libyaml-dev python-pip python-dev python-virtualenv# Clone code
git clone https://github.com/SergK/dev-tool# Create venv, for example in ~/venv/dev-tool:
cd dev-tool
virtualenv ~/venv/dev-tool
source ~/venv/dev-tool/bin/activate
pip install --upgrade -r requirements.txt# Create a new Docker network. Make sure it doesn't overlap with already existing ones.
docker network create -d bridge --subnet 172.10.10.0/24 dev-netWorking with code
-----------------All services are available on *localhost*. To address services inside containers,
you need to use their names. Please check the list below:format is: *service-name-inside-container: PORT*
* db: 3306
* memcached: 11211
* nginx: 80
* php: 9000
* redis: 6379
* sphinx: 9312 and 9306for example, if you need to address from your php application database, you need to
point database hostname: *db*, for example:::
username: mysqluser
password: somesecretpassword
databse: mybestdatabse
hostname: dbthe same is true for the rest services. But again, if you need to access to database from
your host, you need to point *localhost:3306*All your code should be placed in */srv/www* directory if it doesn't exist, please do this
Working with services
---------------------To *start* the services you need activate virtualenv:
source ~/venv/dev-tool/bin/activate
Start the services:
cd dev-tool/docker-compose
./start_all.sh
To stop the services, do the same as above, but:
./remove_all.sh