Docker image to run phalcon framework with mongodb projects
The project must be in the /usr/local/src (with "public" folder) folder container folder and will be available on port :80 of the container
- stable
- latest
docker pull gerardojunior/tap.api.environment:stable
to build the image you need install the docker engine only
*~ You can try building with different versions of software with docker args, for example: PHP_VERISON=7.2.5 ~*
git clone https://github.com/gerardo-junior/tap.api.environment.git
cd tap.api.environment
docker build . --tag gerardojunior/tap.api.environment
*~ you can install with xdebug with the argument: DEBUG=true ~*
# in your project folder
docker run -it --rm -v $(pwd):/usr/share/src -p 1234:80 -p 4321:8080 gerardojunior/tap.api.environment:stable [command]
With docker-compose
Create the docker-compose.yml file in your project folder with:
# (...)
api:
image: gerardojunior/tap.api.environment:stable
restart: on-failure
volumes:
- type: bind
source: ./
target: /usr/share/src
ports:
- 1234:80
- 4321:8080
links:
- mongodb
depends_on:
- mongodb
mongodb:
image: mongo:3.6.4
restart: on-failure
environment:
- MONGO_DATA_DIR=/data/db
volumes:
- type: volume
source: dbdata
target: /data/db
volume:
nocopy: true
command: mongod --smallfiles --logpath=/dev/null
# (...)
volumes:
dbdata:
name: "tap-dbdata"
# (...)
docker run -it --rm gerardojunior/tap.api.environment:stable /bin/sh
# or with docker-compose
docker-compose run api /bin/sh
This project is licensed under the MIT License - see the LICENSE file for details