File tree Expand file tree Collapse file tree 6 files changed +65
-2
lines changed Expand file tree Collapse file tree 6 files changed +65
-2
lines changed Original file line number Diff line number Diff line change 1111/tests export-ignore
1212/.editorconfig export-ignore
1313/.github export-ignore
14+ /docker export-ignore
Original file line number Diff line number Diff line change 1111 strategy :
1212 fail-fast : true
1313 matrix :
14- php : [7.3, 7.4]
14+ php : [7.3, 7.4, 8.0 ]
1515 stability : [prefer-lowest, prefer-stable]
1616
1717 name : PHP ${{ matrix.php }} - ${{ matrix.stability }}
Original file line number Diff line number Diff line change @@ -165,6 +165,25 @@ Both models must use the AuditLoggable trait (ex: Post and Tag) so that `$post->
165165composer test
166166```
167167
168+ ### Using Docker
169+ All assets are set up under the docker-compose.yml file. The first time you run the docker image you must build it with
170+ the following command:
171+ ``` bash
172+ docker-compose build
173+ ```
174+
175+ Then you can bring it up in the background using:
176+ ``` bash
177+ docker-compose up -d
178+ ```
179+
180+ And the image is aliased so you can access its command line via:
181+ ``` bash
182+ docker exec -it processes-stamp-app /bin/bash
183+ ```
184+
185+ From there you can run the tests within an isolated environment
186+
168187## Contributing
169188
170189Please see [ CONTRIBUTING] ( CONTRIBUTING.md ) for details.
Original file line number Diff line number Diff line change 2323 }
2424 ],
2525 "require" : {
26- "php" : " ^7.3" ,
26+ "php" : " ^7.3|^8.0 " ,
2727 "awobaz/compoships" : " ^2.0.3" ,
2828 "fico7489/laravel-pivot" : " ^3.0.1" ,
2929 "laravel/framework" : " ^8.0" ,
Original file line number Diff line number Diff line change 1+ version : " 3.7"
2+ services :
3+ app :
4+ build :
5+ context : ./
6+ dockerfile : ./docker/Dockerfile
7+ image : auditlog
8+ container_name : auditlog-app
9+ restart : unless-stopped
10+ working_dir : /var/www/
11+ volumes :
12+ - ./:/var/www
Original file line number Diff line number Diff line change 1+ FROM php:8.0-fpm
2+
3+ # Install system dependencies
4+ RUN apt-get update && apt-get install -y \
5+ git \
6+ curl \
7+ libpng-dev \
8+ libonig-dev \
9+ libxml2-dev \
10+ libzip-dev \
11+ zip \
12+ unzip
13+
14+ # Clear cache
15+ RUN apt-get clean && rm -rf /var/lib/apt/lists/*
16+
17+ # Install PHP extensions
18+ RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip
19+
20+ # Get latest Composer
21+ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
22+
23+ # Create system user to run Composer and Artisan Commands
24+ RUN useradd -G www-data,root -d /home/ubuntu ubuntu
25+ RUN mkdir -p /home/ubuntu/.composer && \
26+ chown -R ubuntu:ubuntu /home/ubuntu
27+
28+ # Set working directory
29+ WORKDIR /var/www
30+
31+ USER ubuntu
You can’t perform that action at this time.
0 commit comments