Added a Docker containerisation

This commit is contained in:
Carvallegro 2017-12-04 15:56:48 +11:00
parent 11bf85371a
commit a2f7357f01
3 changed files with 40 additions and 0 deletions

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM php:apache
COPY . /var/www/html/
# Authorize these folders to be edited
RUN chmod -R 777 /var/www/html/storage
RUN chmod -R 777 /var/www/html/bootstrap/cache
# Install ZIP extension
RUN apt-get update && \
apt-get install -y --no-install-recommends zip libzip-dev
RUN pecl install zip && \
docker-php-ext-enable zip
# Allow rewrite
RUN a2enmod rewrite

View File

@ -28,6 +28,24 @@ Akaunting uses [Laravel](http://laravel.com), the best existing PHP framework, a
* Run the following commands separately: `composer install` , `composer dump-autoload`
* Finally, launch the [installer](https://akaunting.com/docs/installation)
## Docker
It is possible to containerise Akounting using the [`docker-compose`](./docker-compose.yaml) file. Here are a few commands:
```
# Make sure you the dependencies are installed
composer install && composer dump-autoload
# Build the app
docker-compose build
# Run the app
docker-compose up
# Access the container
docker exec -it CONTAINER_ID /bin/sh
```
## Contributing
Fork the repository, make the code changes then submit a pull request.

7
docker-compose.yaml Normal file
View File

@ -0,0 +1,7 @@
version: '3'
services:
web:
image: akaunting
build: .
ports:
- "80:80"