-
-
Save mercadoveiculos-old/fed54c3f52dd58ef821deaf4fcaa92f4 to your computer and use it in GitHub Desktop.
Nginx, PHP FPM, MongoDB Docker Compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3" | |
| services: | |
| server: | |
| container_name: settings_server | |
| image: nginx:1.15 | |
| ports: | |
| - "8080:80" | |
| volumes: | |
| - ./docker/server/nginx/default.conf:/etc/nginx/conf.d/default.conf | |
| - .:/var/www/html | |
| depends_on: | |
| - api | |
| api: | |
| container_name: settings_api | |
| build: | |
| context: . | |
| dockerfile: docker/api/Dockerfile | |
| ports: | |
| - "9000:9000" | |
| volumes: | |
| - .:/var/www/html | |
| depends_on: | |
| - data | |
| data: | |
| container_name: settings_data | |
| image: mongo:3.4 | |
| environment: | |
| - MONGO_INITDB_DATABASE=settings | |
| - MONGO_INITDB_ROOT_USERNAME=api_platform | |
| - MONGO_INITDB_ROOT_PASSWORD=123456 | |
| ports: | |
| - "27017:27017" | |
| # Docker File | |
| FROM php:7.3-fpm | |
| RUN apt-get update && apt-get install -y git zip unzip \ | |
| && apt-get install -y libcurl4-openssl-dev pkg-config libssl-dev \ | |
| && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ | |
| && php composer-setup.php --install-dir=/usr/local/bin --filename=composer \ | |
| && rm composer-setup.php \ | |
| && docker-php-ext-install opcache \ | |
| && pecl install mongodb apcu && docker-php-ext-enable mongodb apcu opcache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment