Loading...
 

Docker

Docker for Tiki Testing and Tiki Development 


Why Docker 

Docker allows you to run the exact same environment on different machines, thus preventing bugs related to using different operating systems (e.g., Windows, macOS, Linux), different packages versions (e.g., Apache HTTP Server, PHP, MySQL...), and therefore different environments (e.g., development, staging, production). Less time dealing with environment issues = more time developing awesome features!

Start Testing or Developing 

This guide assumes that you are comfortable with developer tools like bash/sh, docker, dotenv and git. If you are not, and you are only looking for testing Tiki, you can access our online Tiki demos here: https://tiki.org/Demo If you are a developer but are not comfortable with those tools, you can have a look at the Resources part first.

Testing 

1. Clone the tiki-docker repo into your new project folder 
git clone git@gitlab.com:tikiwiki/tiki-docker.git my-tiki-project
cd my-tiki-project

2. Copy the default dotenv file included 
cp .env.example .env

3. Edit your dotenv file as necessary 

See .env file for available config options. By default the latest version of Tiki is installed; you can change the version in the .env file.

4. Start your docker environment 
docker-compose up -d

Wait about 30 seconds for Apache to start and MariaDB to generate the system files. You can go grab a coffee. If you want to check the status live, you can always use the usual docker-compose logs -f.

5. Once MariaDB is done, install the Tiki database 
docker-compose exec tiki php console.php database:install

Takes about 15 seconds. Lots of queries!

6. Enjoy 

Tiki is now available at http://localhost. Default credentials are the usual admin/admin.

7. Clean after yourself! 

Don't forget to stop the containers once you're done playing:

docker-compose down

To start playing again, run the usual:

docker-compose up -d

Developing 

To modify the source, first follow the same steps as for testing, then:

1. Clone the Tiki source code 
git clone git@gitlab.com:tikiwiki/tiki.git --origin upstream

2. Check out the relevant branch 

Check out the Tiki version you want to work on, e.g.:

git checkout 19.x

Be reminded that the Docker Environment and the Tiki source code are two different things, which is why you need to precise both, the first by editing the .env file, the later by checking out the branch you need. Docker gives you the correct environment (Apache, PHP, extensions, etc...) while git gives you the correct source code.

3. Modify the .env file if necessary 

If you've installed the source in another folder than the default tiki, you will need to edit your .env. Same with port numbers for Apache and MariaDB if you're running several Docker Tiki instances at the same time.

4. Mount the Tiki source code to your containers 

Stop your containers ( docker-compose down ). Then mount the Tiki source by also using the composer dev file when restarting your containers:

docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d

5. Enjoy 

You can now access your Tiki source at http://localhost. It's a normal fresh installation from source, so you will need to install the composer dependencies, the database, etc. See below to access your docker workspace.

6. Access your docker workspace 
docker-compose exec tiki bash

You are now inside your container, in your source code folder. You can do whatever you want, including running composer install as usual, or Tiki commands like php console.php database:update.

7. Debug with Xdebug 

Xdebug is installed by default in the Docker images. You just need to specify which port your Xdebug client is going to listen to and which host OS is running your Docker Environment in the .env file. Then set up your client accordingly as you would usually do, and Xdebug will send the debug information to it.

Tips 

Speed up Docker on Windows and macOS 

Docker is very fast, but slower on Windows and macOS. If this is an issue for you, the Tiki Docker Environment comes with configuration files for docker-sync, a tool to speed up transfers between your host and your Docker containers. All you have to do is install docker-sync, and start your containers with docker-sync-stack start rather than docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d. ( docker-sync-stack start will actually launch the latter command after it has started docker-sync.)

Create aliases 

Rather than typing every time docker-compose -f docker-compose.yml -f docker-compose.dev.yml up or docker-sync-stack start, you might want to create aliases, like for example devup. Same for stopping your containers: devdown, or going into your workspace: devbash.

Resources 

Issues, questions 

Please report on the tiki-docker repo: https://gitlab.com/tikiwiki/tiki-docker
Thanks!



Related: Kubernetes and AppImage


Soon to be official 

https://github.com/TikiWiki/docker-tikiwiki/tree/19.x
https://hub.docker.com/r/tikiwiki/tikiwiki
https://hub.docker.com/r/tikiwiki/php

Guillaume 

https://sleeplessmind.com.mo/news/docker-tiki/
https://github.com/godbout/docker-tiki
https://gitlab.com/guill/docker-tiki

Fabio 

https://github.com/fabiomontefuscolo/docker-tikiwiki

Jyhem 


Everything I know on the topic of getting a working Tiki12 on docker is reported here: https://tiki.org/Tiki-deployement---Experiment-with-appsdeck

Nelson 

See this commit for all the info: https://gitlab.com/synergiq/tiki/commit/050df06191d4652d49faf5f85420890740992862
The link to the branch (from master) is https://gitlab.com/synergiq/tiki/tree/docker

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Group
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend, alert + Social Bookmarking
Terms and Conditions
Theme
TikiTests
Timesheet
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools