├── .gitignore ├── README.md ├── config ├── connect.inc.php └── php.ini └── docker-compose.yml /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /app-data 3 | /db-data 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LWT Docker 2 | 3 | A quick local setup of [Learning With Texts][1] using [Docker][2] 4 | and [Docker Compose][3]. 5 | 6 | ## Usage 7 | 8 | First you need to have [Docker][2] installed and set up correctly. 9 | This may require creating a VM with [docker-machine][4] - [Kitematic][5] is 10 | a tool which does this automatically. 11 | 12 | When docker is set up (output of `docker ps` doesn't complain about connection 13 | issues), you need to clone or download this repo and run: 14 | 15 | ```sh 16 | docker-compose up -d 17 | ``` 18 | 19 | LWT should be running now, available at the IP address of your docker host 20 | and port 7070. 21 | 22 | Feel free to change the timezone in [config/php.ini](config/php.ini) (you'll 23 | need to restart lwt-app docker container to make it work). 24 | 25 | [1]: http://lwt.sf.net/ 26 | [2]: https://www.docker.com/ 27 | [3]: https://docs.docker.com/compose/overview/ 28 | [4]: https://docs.docker.com/machine/overview/ 29 | [5]: https://kitematic.com/ 30 | -------------------------------------------------------------------------------- /config/connect.inc.php: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /config/php.ini: -------------------------------------------------------------------------------- 1 | error_log = /var/log/php-error 2 | 3 | [Date] 4 | ; Defines the default timezone used by the date functions 5 | ; http://php.net/date.timezone 6 | date.timezone = Europe/Warsaw 7 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | volumes: 4 | app-media: {} 5 | db-data: {} 6 | 7 | services: 8 | lwt-app: 9 | image: brianhicks/lwt-docker:latest 10 | links: 11 | - lwt-db:mysql 12 | volumes: 13 | - app-media:/var/www/html/media 14 | - ./config/connect.inc.php:/var/www/html/connect.inc.php:ro 15 | - ./config/php.ini:/usr/local/etc/php.ini:ro 16 | depends_on: 17 | - lwt-db 18 | ports: 19 | - 7070:80 20 | lwt-db: 21 | image: mariadb:latest 22 | environment: 23 | - MYSQL_ROOT_PASSWORD=lwtdbrootpassword 24 | - MYSQL_DATABASE=learning-with-texts 25 | - MYSQL_USER=lwt 26 | - MYSQL_PASSWORD=lwt 27 | volumes: 28 | - db-data:/var/lib/mysql 29 | --------------------------------------------------------------------------------