- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13
 
Add docker nginx & php-fpm #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
      
          
      
      
            kenjis
  
      
      
      commented
        Jul 23, 2022 
      
    
  
- add Nginx 1.23
 - add PHP-FPM 8.1
 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to move these back into Template/? If so please justify.
| 
           You need to copy files to use Nginx and PHP. 
  | 
    
| 
           Got it! I rarely use Docker but let me know when this is ready for review and I will take it for a spin. I should be a good Guinea pig for the instructions given my noobiness  | 
    
| 
           @kenjis I'm using docker in my development and here is the my setup. I have folder  I started also to build  So I started my journey to find suitable image with  It works perfectly for development and even for production. My Dockerfile for development looks now like: FROM tiredofit/nginx-php-fpm:8.0-alpine_3.16
ENV STAGE DEVELOPMENT
ENV TIMEZONE Europe/Bratislava
ENV NGINX_WEBROOT /app/public
ENV PHP_MEMORY_LIMIT 1G
ENV PHP_ENABLE_PDO_SQLITE TRUE
ENV PHP_ENABLE_REDIS TRUE
WORKDIR /app
COPY . .I'm enabling  My docker-compose looks like: version: "3.7"
services:
  app:
    build:
      context: .
      dockerfile: docker/development/Dockerfile
    ports:
      - 8080:80
    volumes:
      - .:/app
    depends_on:
      - redis
      - mariadb
    networks:
      - codeigniter4
  redis:
    image: redis:alpine
    ports:
      - 6379:6379
    volumes:
      - redis:/data
    networks:
      - codeigniter4
  mariadb:
    image: mariadb:latest
    ports:
      - 3306:3306
    volumes:
      - ./initdb:/docker-entrypoint-initdb.d
      - mariadb:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: gponcontrol
      MYSQL_USER: gponcontrol
      MYSQL_PASSWORD: gponcontrol
    networks:
      - codeigniter4
  phpmyadmin:
    image: phpmyadmin/phpmyadmin:latest
    environment:
      PMA_HOST: mariadb
      PMA_PORT: 3306
    ports:
      - 8888:80
    volumes:
      - phpmyadmin:/sessions
    depends_on:
      - mariadb
    networks:
      - codeigniter4
networks:
  codeigniter4:
volumes:
  redis:
  mariadb:
  phpmyadmin: |