Skip to content

oat-sa/pci-training-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PCI Training

A Docker stack for working with PCI in TAO.

Table of contents

Checkout

To install the project, you can either check it out using Git, or download a Zip file.

git clone https://github.com/oat-sa/pci-training-docker.git

Note: The command above assumes you opened a terminal and changed the current directory to a parent folder. A sub-folder will be created to contain the project: pci-training-docker.

TL; DR

Once the stack is installed, you can open TAO on your browser at https://training.pci.localhost

cd pci-training-docker
make up

Note: the commands listed below assume you opened a terminal and changed the current directory to the root of the project:

Install the stack

make

Stop the stack

make down

Start the stack

make up

Open a terminal on the server

make bash

Prerequisites

  • Install mkcert following the official guide
  • Install Docker and Docker Compose [OSX] [Ubuntu] [Windows]
  • Make sure you have a minimum of 4GB RAM assigned to Docker

Installation

make

Open TAO on your browser at https://training.pci.localhost

Commands

  • Start the server
make up
  • Stop the server
make down
  • Stop and delete the server
make tear-down
  • Install TAO
make tao-install
  • Update TAO
make tao-update
  • Install the TAO tooling
make tao-install-tools
  • Install a TAO extension
make tao-install-extension theTaoExtensionToInstall
  • Bundle the JavaScript for a TAO extension
make tao-bundle theTaoExtensionToBundle
  • Bundle the CSS for a TAO extension
make tao-sass theTaoExtensionToBundle
  • Compile and package PCI for a TAO extension
make tao-pci theTaoExtensionToBundle
make tao-pci theTaoExtensionToBundle thePCIidentifier
  • Open a terminal on the TAO server
make tao-bash
  • Install the source code
make composer-install
  • Update the source code
make composer-update
  • Install the stack
make install
  • Uninstall the stack
make uninstall

Troubleshoot

Windows specific

On Windows be sure to modify the ROOT_FS environment variable to c:/ in the .env file:

ROOT_FS=c:/

Manual installation

  • Enter package directory:
cd stack
  • Open the certs folder:
cd certs
  • Generate a self-signed certificate:
mkcert \
-cert-file pci.localhost-cert.pem \
-key-file pci.localhost-key.pem \
pci.localhost "*.pci.localhost"
  • Install the generated self-signed certificate to your OS:
mkcert -install
  • Go back to the root of the project:
cd ..
  • Create pci-docker docker network:
docker network create pci-docker
  • Build docker services:
docker compose up -d
  • Enter TAO directory:
cd ../tao
  • Install the sources:
composer install --prefer-source
  • Enter package directory:
cd ../stack
  • Install the platform:
docker exec -it pci-training-phpfpm php tao/scripts/taoSetup.php /var/stack/setup.json -vvv

Manual uninstallation

  • Enter package directory:
cd stack
  • Tear down the docker services:
docker compose down --rmi all -v
  • Remove the pci-docker docker network:
docker network rm pci-docker
  • Open the certs folder:
cd certs
  • Uninstall the generated self-signed certificate to your OS:
mkcert -uninstall

Manual commands

  • Start the server
docker compose -p pci-training -f ./stack/docker-compose.yml up -d
  • Stop the server
docker compose -p pci-training -f ./stack/docker-compose.yml down
  • Install TAO
docker exec -it pci-training-phpfpm composer install --prefer-source --no-interaction --no-progress
docker exec -it pci-training-phpfpm bash ./tao-cleanup.sh
docker exec -it pci-training-phpfpm php tao/scripts/taoSetup.php /var/stack/setup.json -vvv
docker exec -it pci-training-phpfpm bash ./tao-build.sh install
docker exec -it pci-training-phpfpm bash ./tao-mathjax.sh
  • Update TAO
docker exec -it pci-training-phpfpm composer update --prefer-source --no-interaction --no-progress
docker exec -it pci-training-phpfpm php tao/scripts/taoUpdate.php -vvv
  • Install a TAO extension
docker exec -it pci-training-phpfpm php tao/scripts/installExtension.php theTaoExtensionToInstall
  • Bundle the JavaScript for a TAO extension
docker exec -it pci-training-phpfpm bash ./tao-build.sh bundle theTaoExtensionToBundle
  • Bundle the CSS for a TAO extension
docker exec -it pci-training-phpfpm bash ./tao-build.sh sass theTaoExtensionToBundle
  • Compile and package PCI for a TAO extension
docker exec -it pci-training-phpfpm bash ./tao-build.sh pci theTaoExtensionToBundle
docker exec -it pci-training-phpfpm bash ./tao-build.sh pci theTaoExtensionToBundle thePCIidentifier
  • Open a terminal on the TAO server
docker exec -it pci-training-phpfpm bash