Skip to content

Commit ff3cecd

Browse files
authored
Merge pull request #56 from php-ago/v4.1.0
V4.1.0
2 parents bba42f0 + d4da3ed commit ff3cecd

File tree

6 files changed

+62
-0
lines changed

6 files changed

+62
-0
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.git
2+
vendor

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"intelephense.environment.phpVersion": "8.1.0"
3+
}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Release Notes
22

3+
## v4.1.0 (2025-06-18)
4+
💻 Added Docker to the project
5+
36
## v4.0.1 (2025-01-18)
47
- 🐛 Bug fix with incorrect days in a year
58

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM php:8.1-cli
2+
3+
# unzip and git are needed for composer to run
4+
RUN apt-get update && apt-get install -y \
5+
unzip \
6+
git \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
# Install Composer binary
10+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
11+
12+
WORKDIR /app
13+
14+
# Copy composer files first for better cache usage
15+
COPY composer.json composer.lock* ./
16+
17+
# Install all the dependencies and clear cache
18+
RUN composer install --no-interaction --prefer-dist --no-progress && \
19+
composer clear-cache
20+
21+
# Copy the rest of the application
22+
COPY . .
23+
24+
ENTRYPOINT [ "bash" ]

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,20 @@ composer require serhii/ago
2727

2828
## License
2929
The Ago project is licensed under the [MIT License](https://github.com/php-ago/ago/blob/master/LICENSE)
30+
31+
## Development
32+
### Without Docker
33+
You'll need to have Composer and PHP installed on your machine
34+
35+
### Docker
36+
#### Build an image
37+
To build an image, navigate to the root of project that contains `Dockerfile` and run this command:
38+
```bash
39+
docker compose build app
40+
```
41+
42+
#### Run the container
43+
To run the container, navigate to the root of project that contains `Dockerfile` and run this command:
44+
```bash
45+
docker compose run --rm app
46+
```

docker-compose.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: php-serhii-ago
2+
3+
services:
4+
app:
5+
build:
6+
context: .
7+
image: php-serhii-ago
8+
volumes:
9+
- .:/app
10+
environment:
11+
- TERM=xterm-256color
12+
tty: true
13+
stdin_open: true

0 commit comments

Comments
 (0)