Created
          October 28, 2019 15:07 
        
      - 
      
 - 
        
Save ypereirareis/362ddf09620769fb9625d2288249d6be to your computer and use it in GitHub Desktop.  
    Split env file solutions
  
        
  
    
      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.5' | |
| services: | |
| # Php service configuration | |
| php: | |
| image: ${REGISTRY_PATH}/php:${TAG_PHP} | |
| networks: | |
| - default | |
| - database | |
| environment: | |
| MEMORY_LIMIT: "${MEMORY_LIMIT}" | |
| DB_HOST: "${DB_HOST}" | |
| DB_PORT: "${DB_PORT}" | |
| DB_NAME: "${DB_NAME}" | |
| DB_USER: "${DB_USER}" | |
| DB_PASSWORD: "${DB_PASSWORD}" | |
| deploy: | |
| replicas: ${REPLICA_COUNT_PHP:-1} | |
| resources: | |
| limits: | |
| memory: "${PHP_MEM_LIMIT:-1G}" | |
| # Nginx service configuration | |
| nginx: | |
| image: ${REGISTRY_PATH}/nginx:${TAG_NGINX} | |
| environment: | |
| HOSTNAME: "${HOSTNAME}" | |
| networks: | |
| - default | |
| ports: | |
| - ${HTTP_PORT}:80 | |
| deploy: | |
| replicas: ${REPLICA_COUNT_NGINX:-1} | |
| resources: | |
| limits: | |
| memory: "${NGINX_MEM_LIMIT:-1G}" | |
| networks: | |
| default: | |
| # The database network is external because used by many docker stacks | |
| database: | |
| external: true | |
| name: "${DATABASE_NETWORK}" | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment