Hey all,

Does anyone have any examples of docker-compose.yml and dockerfile for use on Linux Ubuntu?

I am new to tastyigniter but am trying to set up the environment in docker before getting stuck in.
I have got the LAMP stack sorted but having issues getting composer going.

Thanks.

    Thanks. I managed to resolve the issue I was having. But I have connected with your discord channel as it looks very useful.

      3 months later

      martin352 Hello Martin,

      do you currently have your TI instance running in docker? Do you have a docker-compose.yml that you can provide? Would help me a lot.

      Thanks 🙂

        info124 sure why not. But it will be this evening unfortunately as I have no access to my computer right now.

          It’s somewhat difficult to paste this properly here, even when using the ‘insert code’ option, and I am unable to upload a picture either, without hosting it somewhere else and putting a link to it. I can see why people use Discord instead. So here is is anyway. Do you need the Dockerfile?

          version: ‘3.8’

          Services

          services:

          # PHP Service
          php:
              build:
                  dockerfile: php-dockerfile
              volumes:
                  - './php-files:/var/www/html'
              depends_on:
                  - mariadb
          
          # Nginx Service
          nginx:
              image: nginx:latest
              ports:
                  - 80:80
              links:
                  - 'php'
              volumes:
                  - './php-files:/var/www/html'
                  - './nginx-conf:/etc/nginx/conf.d'
              depends_on:
                  - php
          
          # MariaDB Service
          mariadb:
              image: mariadb:10.9
              environment:
                  MARIADB_ROOT_PASSWORD: 'SOME_PASSWORD'
                  MARIADB_USER: 'SOME_USER'
                  MARIADB_PASSWORD: 'SOME_PASSWORD'
                  MARIADB_DATABASE: 'SOME_DBNAME'
              volumes:
                  - "./db:/var/lib/mysql"

          Volumes

          volumes:

          mysqldata:

            martin352
            Thank you for your quick reply. It would be great if you could also give me the Dockerfile. Otherwise, can I reach you on Discord?

              info124 get me on there. My name on there is westerncms

              Am out all day today but will login this evening my. I’ll re send the above and get you the Dockerfile.

                Great! I have replied back on discord with what I use in my docker-compose.yml, php-dockerfile and little bit more info. Just let me know if I can help further.
                I don’t yet use it in production, but it works to all intents and purposes. I have tested it with a full menu for a pizza/kebab/fast-food place with various functions, API and extensions. I am fairly sure other people use TI in docker too.

                  Also I should mention, I have sent you instructions on setting up the LEMP stack. You still need to install TI once you get that up and running. I use the wizard after uploading the setup-master.zip file to the server. Unpack the zip file and run the wizard. Make sure you install it into ./php-files, if you are using the volume in the docker-compose.yml content above, in the nginx section. Easiest way is to move the unpacked setup files to that directory and begin the install.

                  I’ve also just remembered I need to send you the nginx.conf file contents. You need that file in the ./nginx-conf directory (create both the directory and the nginx.conf file before building your containers). I’ll paste the content over on Discord.

                    6 months later

                    martin352
                    Hi Martin, just wondering if I could get hold of your dockerfile/php-files/nginx-conf?
                    Tried to give you a shout on discord but can’t find you.
                    Many thanks,
                    Felix