Docker env update
This commit is contained in:
		| @@ -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 \ |     && docker-php-ext-install pdo_mysql gd zip \ | ||||||
|     && rm -rf /var/lib/apt/lists/* |     && 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/ | COPY . /var/www/html/ | ||||||
|  |  | ||||||
| # Authorize these folders to be edited | # 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 | ## 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 | # Make sure you the dependencies are installed | ||||||
| composer install | docker-compose exec web composer install | ||||||
|  |  | ||||||
| # Build the app | # Stream logs | ||||||
| docker-compose -f docker/docker-compose.build.yaml build | docker-compose logs -f web | ||||||
|  |  | ||||||
| # Run the app |  | ||||||
| docker-compose up |  | ||||||
|  |  | ||||||
| # Access the container | # Access the container | ||||||
| docker exec -it CONTAINER_ID /bin/sh | docker-compose exec web /bin/sh | ||||||
| ``` |  | ||||||
|  |  | ||||||
| #### Examples | # Stop & Delete everything | ||||||
| In the `docker/` folder you'll find some example file to run the image with several databases.  | docker-compose down -v | ||||||
|  | ``` | ||||||
|  |  | ||||||
| ## Contributing | ## Contributing | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| version: '3' | version: '3' | ||||||
| services: | services: | ||||||
|   mysql: |   mysql: | ||||||
|     image: mysql |     image: mysql:5 | ||||||
|     ports: |     ports: | ||||||
|       - 3306:3306 |       - 3306:3306 | ||||||
|     environment: |     environment: | ||||||
| @@ -11,12 +11,12 @@ services: | |||||||
|       MYSQL_PASSWORD: akaunting_password |       MYSQL_PASSWORD: akaunting_password | ||||||
|   web: |   web: | ||||||
|     image: akaunting |     image: akaunting | ||||||
|     ## Uncomment if you wish to use this configuration as development environment. |     build: ./ | ||||||
|     # volumes: |     volumes: | ||||||
|     #   - ../:/var/www/html |       - ./:/var/www/html | ||||||
|     ports: |     ports: | ||||||
|       - 8080:80 |       - 8080:80 | ||||||
|     environment: |     environment: | ||||||
|       APP_DEBUG: "true" |       APP_DEBUG: "true" | ||||||
|     links: |     links: | ||||||
|       - mysql |       - mysql | ||||||
| @@ -1,7 +0,0 @@ | |||||||
| version: '3' |  | ||||||
| services: |  | ||||||
|   web: |  | ||||||
|     image: akaunting |  | ||||||
|     build: ../ |  | ||||||
|     ports: |  | ||||||
|       - "80:80" |  | ||||||
		Reference in New Issue
	
	Block a user