https://github.com/othyn/tastyigniter-docker-testing
Handy repo for testing TastyIgniter with Docker & Docker Compose
https://github.com/othyn/tastyigniter-docker-testing
Last synced: 5 months ago
JSON representation
Handy repo for testing TastyIgniter with Docker & Docker Compose
- Host: GitHub
- URL: https://github.com/othyn/tastyigniter-docker-testing
- Owner: othyn
- Created: 2021-12-11T16:17:29.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-11T16:42:27.000Z (over 4 years ago)
- Last Synced: 2025-02-06T02:19:30.926Z (over 1 year ago)
- Language: Dockerfile
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tasty Igniter - Docker Testing
A simple and easy Docker testing environment for [TastyIgniter](https://github.com/tastyigniter/TastyIgniter).
## NOTE ON A REQUIRED CHANGE
Once my PR for unattended installation is merged into main, this repo can be significantly changed so that the build of
TastyIgniter can be placed into the Dockerfile itself.
## Setup
Ensure that you are happy with any defaults in `.env.example`, then simply run:
```sh
make setup
```
This will;
- Create a working copy of `.env.example` to `.env`
- Build a set of images for the repo via Docker Compose
- Bring up the detached containers
- Run the TastyIgniter CLI installation wizard
- Unfortunately it **does not** have a non-interactive mode otherwise I'd automated this as part of the container build step
- I need to submit a PR against [TastyIgniter](https://github.com/tastyigniter/TastyIgniter) for this!
- This should be an easy addition
- Choose 'yes' to generate the app key in prod, its a limitation of TastyIgniter's fixed env
- During installation remember to set the database host to the container name, which by default is `ti-docker-testing-database`
- Provide the information as requested, passing in `.env` variables set. I usually just mash enter
- ...with the only exception being adding `tasty` (or whatever you set the `.env` variables to) when passing in the database, username and password
- ...also make sure not to skip over adding yourself to admin groups, otherwise you're locked out of everything!
- Then head to [http://localhost/admin/login](http://localhost/admin/login) to get started!
### Setup for a local development version of TastyIgniter
If you're working from a local git development version of TastyIgniter in `~/git/tastyigniter`, that can be used as a source for this repo.
Use the command:
```sh
make setup-dev
```
To do pretty much what the `make setup` command does, but sourcing the TastyIgniter source code from the local cloned git version of TastyIgniter in `~/git/tastyigniter`, which is really handy for testing of TastyIgniter.
Database migration may fail during the above command due to the MySQL container not coming online fast enough. If so, just run:
```sh
make install-dev
```
Which will re-run just the specific installation part of the process, which should now work fine.
### Why port 80 by default?
In your `.env`, `WEB_EXT_PORT` is set to `80` by default. I've found that FireFox _does not_ like running from `8080` (or any non-standard port) for relative links, which breaks _all_ of the links that TastyIgniter makes use of for buttons and asset paths, so it completely breaks if its not over port `80`. Helpful.
## Development
To quickly bring up or down containers you can use exposed `make` commands, if you don't have shell aliases already setup:
```sh
make up
make down
```
To access a shell within the app container, you can use:
```sh
make shell
```
To clean out the repo and built fragments, you can use:
```sh
make clean
```