Merge pull request #353 from birkof/docker-env-update

Docker env update
This commit is contained in:
Denis Duliçi 2018-05-25 17:20:10 +03:00 committed by GitHub
commit eb36b4d8f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 23 deletions

View File

@ -4,6 +4,15 @@ RUN apt-get update && apt-get install -y zip libzip-dev libpng-dev \
&& docker-php-ext-install pdo_mysql gd zip \
&& rm -rf /var/lib/apt/lists/*
# Composer installation.
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN composer global require hirak/prestissimo --prefer-dist --no-progress --no-suggest --classmap-authoritative \
&& composer clear-cache
ENV PATH="${PATH}:/root/.composer/vendor/bin"
COPY . /var/www/html/
# Authorize these folders to be edited

View File

@ -31,24 +31,24 @@ Akaunting uses [Laravel](http://laravel.com), the best existing PHP framework, a
## Docker
It is possible to containerise Akaunting using the [`docker-compose`](docker/docker-compose.build.yaml) file. Here are a few commands:
It is possible to containerise Akaunting using the [`docker-compose`](docker-compose.yaml) file. Here are a few commands:
```
# Build & Run the app
docker-compose up -d
# Make sure you the dependencies are installed
composer install
docker-compose exec web composer install
# Build the app
docker-compose -f docker/docker-compose.build.yaml build
# Run the app
docker-compose up
# Stream logs
docker-compose logs -f web
# Access the container
docker exec -it CONTAINER_ID /bin/sh
```
docker-compose exec web /bin/sh
#### Examples
In the `docker/` folder you'll find some example file to run the image with several databases.
# Stop & Delete everything
docker-compose down -v
```
## Contributing

View File

@ -1,7 +1,7 @@
version: '3'
services:
mysql:
image: mysql
image: mysql:5
ports:
- 3306:3306
environment:
@ -11,9 +11,9 @@ services:
MYSQL_PASSWORD: akaunting_password
web:
image: akaunting
## Uncomment if you wish to use this configuration as development environment.
# volumes:
# - ../:/var/www/html
build: ./
volumes:
- ./:/var/www/html
ports:
- 8080:80
environment:

View File

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