Skip to content

Commit

Permalink
feat(release)!: Use the new nodesource repository instead of the old …
Browse files Browse the repository at this point in the history
…installation script 🧓
  • Loading branch information
gremo committed Sep 14, 2023
1 parent e1667f6 commit 0f7e842
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 9 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ARG COMPOSER_VERSION=lts
#ejs <% if (production) { _%>
ARG KNOWN_HOSTS="bitbucket.org github.com gitlab.com"
#ejs <% } _%>
ARG NODE_VERSION=lts
ARG NODE_VERSION=18
#ejs <% if (mariadb) { _%>
ARG MARIADB_VERSION=11
#ejs <% } _%>
Expand Down Expand Up @@ -154,7 +154,10 @@ RUN \
install-php-extensions $EXTENSIONS; \
fi; \
# Install Node.js, update npm and install Yarm
curl -fsSL https://deb.nodesource.com/setup_"$NODE_VERSION".x | bash -; \
mkdir -p /etc/apt/keyrings; \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list; \
apt-get update; \
apt-get install -y --no-install-recommends nodejs; \
npm update -g npm; \
npm install -g yarn; \
Expand Down
7 changes: 7 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Upgrade

## `0.2.x` to `0.3.0`

The PHP development image now uses the [new installation method for node](https://github.com/nodesource/distributions). Long story short, `lts` and `current` keywords can't be used anymore in `NODE_VERSION` variable.

- Pull the updated PHP development image
- Carefully merge changes in `Dockerfile`, `docker-compose.yml`, `docker-compose.override.yml`

## `0.2.x` to `0.2.4`

- In your `docker-compose.dev.yml` ensure `caddy.volumes` contains `public_bundles:/srv/public/bundles`
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
PHP_VERSION: ${PHP_VERSION:-8}
PHP_EXTENSIONS: ${PHP_EXTENSIONS:-}
COMPOSER_VERSION: ${COMPOSER_VERSION:-lts}
NODE_VERSION: ${NODE_VERSION:-lts}
NODE_VERSION: ${NODE_VERSION:-18}
environment:
APP_ENV: prod
ports:
Expand All @@ -27,7 +27,7 @@ services:
build:
target: php-prod
args:
NODE_VERSION: ${NODE_VERSION:-lts}
NODE_VERSION: ${NODE_VERSION:-18}
environment:
APP_ENV: prod
volumes:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
PHP_VERSION: ${PHP_VERSION:-8}
PHP_EXTENSIONS: ${PHP_EXTENSIONS:-}
COMPOSER_VERSION: ${COMPOSER_VERSION:-lts}
NODE_VERSION: ${NODE_VERSION:-lts}
NODE_VERSION: ${NODE_VERSION:-18}
#ejs <%_ if (!mariadb) { _%>
environment:
DATABASE_ENABLE_MIGRATIONS: false
Expand Down
3 changes: 3 additions & 0 deletions docker/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ ARG EXTENSIONS_DEV
COPY --link php.dev.ini /usr/local/etc/php/conf.d/symfony-sail.dev.ini

RUN \
# Install OS packages
apt-get update; \
apt-get install -y --no-install-recommends gnupg; \
# Copy base configuration file
cp "$PHP_INI_DIR"/php.ini-development "$PHP_INI_DIR"/php.ini; \
# Install PHP extensions
Expand Down
8 changes: 4 additions & 4 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Summary of variables, where they should be defined, and their default values:
<td><code>NODE_VERSION</code></td>
<td align="center">✅</td>
<td align="center">❌</td>
<td>lts</td>
<td>18</td>
</tr>
<tr>
<td colspan="4" align="center">
Expand Down Expand Up @@ -231,9 +231,9 @@ Further considerations:

### Node-related variables

| Variable | Allowed values | Notes |
| :------------- | :-------------------- | :---- |
| `NODE_VERSION` | "current", "lts", `x` | |
| Variable | Allowed values | Notes |
| :------------- | :------------- | :---- |
| `NODE_VERSION` | `x` | |

### Database-related variables

Expand Down

0 comments on commit 0f7e842

Please sign in to comment.