Docker env update
This commit is contained in:
parent
bcb56de06a
commit
2e86f82b47
@ -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
|
||||
|
22
README.md
22
README.md
@ -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
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
version: '3'
|
||||
services:
|
||||
mysql:
|
||||
image: mysql
|
||||
image: mysql:5
|
||||
ports:
|
||||
- 3306:3306
|
||||
environment:
|
||||
@ -11,12 +11,12 @@ 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:
|
||||
APP_DEBUG: "true"
|
||||
links:
|
||||
- mysql
|
||||
- mysql
|
@ -1,7 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
web:
|
||||
image: akaunting
|
||||
build: ../
|
||||
ports:
|
||||
- "80:80"
|
Loading…
x
Reference in New Issue
Block a user