Skip to content

Commit adfad16

Browse files
Configure Renovate (#15)
1 parent e568eab commit adfad16

File tree

5 files changed

+40
-24
lines changed

5 files changed

+40
-24
lines changed

README.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,56 +21,59 @@
2121

2222
# Docker Image: NodeJs Devel
2323

24-
This image is used together with [wayofdev/docker-php-dev](https://github.com/wayofdev/docker-php-dev) and other WOD images, to create local development environment for our projects.
24+
This image is used in conjunction with [wayofdev/docker-php-dev](https://github.com/wayofdev/docker-php-dev) and other WOD images to create a local development environment for our projects.
2525

26-
Has pre-installed packages
26+
## Pre-installed Packages
2727

28-
* [pnpm](https://pnpm.io/) Fast, disk space efficient package manager
29-
* [turbo](https://github.com/vercel/turbo) Incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust – including Turbopack and Turborepo.
30-
* alpine packages:
31-
* git
32-
* curl
33-
* libc6-compat [turbo dependency](https://github.com/vercel/turbo/issues/2198), starting from `^1.5.6`
28+
- [pnpm](https://pnpm.io/) - Fast, disk space efficient package manager
29+
- [turbo](https://github.com/vercel/turbo) - Incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust. Includes Turbopack and Turborepo.
30+
- Alpine packages:
31+
- git
32+
- curl
33+
- libc6-compat - [turbo dependency](https://github.com/vercel/turbo/issues/2198), starting from `^1.5.6`
3434

35-
If you **like/use** this repository, please consider **starring** it. Thanks!
35+
If you find this repository useful, please consider giving it a star. Thank you!
3636

3737
![Screenshot](assets/screenshot.png)
3838

3939
## ⚙️ Development
4040

41-
To install dependencies and start development you can check contents of our `Makefile`
41+
To install dependencies and start development, please check the contents of our `Makefile`.
4242

4343
### → Requirements
4444

45-
For testing purposes we use **goss** and **dgoss**, follow installation instructions on [their official README](https://github.com/aelsabbahy/goss/blob/master/extras/dgoss/README.md)
45+
To install dependencies and start development, please check the contents of our `Makefile`. You will need to have the following tools installed on your machine:
46+
47+
- **jq** - A lightweight and flexible command-line JSON processor. Please refer to the [official installation instructions](https://stedolan.github.io/jq/download/) to install `jq`.
48+
- **goss** and **dgoss** - For testing purposes. Please follow the installation instructions provided in their [official README](https://github.com/aelsabbahy/goss/blob/master/extras/dgoss/README.md).
4649

4750
<br>
4851

4952
### → Building locally
5053

51-
Generating distributable Dockerfiles from yaml source code:
54+
To generate distributable Dockerfiles from the YAML source code, run the following command:
5255

5356
```bash
5457
$ make generate
5558
```
5659

5760
<br>
5861

59-
Building default image:
62+
To build the default image, run the following commands:
6063

6164
```bash
6265
$ git clone [email protected]:wayofdev/docker-node.git && cd docker-node
6366
$ make generate #(optional, to re-create /dist from /src)
6467
$ make build
6568
```
6669

67-
To **build** image, **test** it and then **clean** temporary files run:
70+
To **build** the image, **test** it, and then **clean** temporary files, run the following command:
6871

6972
```bash
7073
$ make
7174
```
7275

73-
Building all images:
76+
To build all images, run the following commands:
7477

7578
```bash
7679
$ make build TEMPLATE="lts-alpine"
@@ -82,13 +85,13 @@ $ make build TEMPLATE="18-alpine"
8285

8386
## 🧪 Testing
8487

85-
Testing default image:
88+
To test the default image, run the following command:
8689

8790
```bash
8891
$ make test
8992
```
9093

91-
To test all images:
94+
To test all images, run the following commands:
9295

9396
```bash
9497
$ make test TEMPLATE="lts-alpine"
@@ -100,13 +103,13 @@ $ make test TEMPLATE="18-alpine"
100103

101104
### → Code quality tools
102105

103-
Run **yamllint** to validate all yaml files in project:
106+
To validate all YAML files in the project, run the following command:
104107

105108
```bash
106109
$ make lint
107110
```
108111

109-
Run hadolint to validate created Dockerfiles:
112+
To validate the created Dockerfiles, run the following command:
110113

111114
```bash
112115
$ make hadolint

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22
"version": "1.7.0",
33
"repository": {
44
"url": "https://github.com/wayofdev/docker-node.git"
5+
},
6+
"dependencies": {
7+
"pnpm": "^7.25.0"
58
}
69
}

renovate.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:base"
5+
]
6+
}

src/group_vars/all.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,4 @@ tpl_docker_tests:
3737
- src: Dockerfiles/all/goss.yaml.j2
3838
dst: "../dist/{{ node_version }}-{{ os_name }}/goss.yaml"
3939

40-
41-
# Enabled extensions
42-
########################################################################################################################
43-
pnpm_version: 7.26.1
44-
4540
...

src/roles/all/main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@
99
with_items:
1010
- "{{ tpl_directories }}"
1111

12+
- name: Get latest pnpm version
13+
shell: cat ./../package.json | jq -r '.dependencies."pnpm"'
14+
register: pnpm_version
15+
changed_when: false
16+
17+
- name: Set pnpm_version
18+
set_fact:
19+
pnpm_version: "{{ pnpm_version.stdout | regex_replace('^(\\^)', '') }}"
20+
1221
- name: Generate Dockerfiles
1322
template:
1423
src: "{{ item.src }}"

0 commit comments

Comments
 (0)