Skip to content

Commit

Permalink
docker cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Gabriel committed Oct 21, 2021
1 parent cfbd9a1 commit e386622
Show file tree
Hide file tree
Showing 12 changed files with 605 additions and 114 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor/
9 changes: 4 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ LOG_CHANNEL=stack
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_HOST=mysql_php
DB_PORT=3306
DB_DATABASE=bp_challenge
DB_USERNAME=bpuser
DB_PASSWORD=bppass
DB_DATABASE=bpchallenge
DB_USERNAME=root
DB_PASSWORD=rootpass

BROADCAST_DRIVER=log
CACHE_DRIVER=file
Expand Down Expand Up @@ -50,6 +50,5 @@ PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

JWT_SECRET=some_key
L5_SWAGGER_GENERATE_ALWAYS=true
L5_SWAGGER_CONST_HOST=http://localhost:8000/api
2 changes: 1 addition & 1 deletion .env.example.docker
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ APP_LOG_LEVEL=debug
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=mysql
DB_HOST=mysqlphp
DB_PORT=3306
DB_DATABASE=bp_challenge
DB_USERNAME=bpuser
Expand Down
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM php:8.0-apache
WORKDIR /var/www/html
COPY composer.* ./

RUN apt-get update && apt-get install -y git unzip zip wget

RUN bash -c "wget https://getcomposer.org/download/2.1.9/composer.phar && php composer.phar install --no-autoloader"
COPY . ./
RUN bash -c "php composer.phar dump-autoload --no-scripts --ignore-platform-reqs"

COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions gd pdo_mysql bcmath zip intl opcache

RUN a2enmod rewrite


RUN php artisan key:generate && php artisan jwt:secret


4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "8.0",
"php": "^8.0",
"darkaonline/l5-swagger": "^8.0",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.54",
"laravel/sanctum": "^2.11",
"laravel/tinker": "^2.5",
"tymon/jwt-auth": "^1.0"
"tymon/jwt-auth": "dev-develop"
},
"require-dev": {
"roave/security-advisories": "dev-latest"
Expand Down
Loading

0 comments on commit e386622

Please sign in to comment.