Skip to content

Commit

Permalink
Merge pull request naskio#14 from jongon/main
Browse files Browse the repository at this point in the history
Upgrading node version to 18
  • Loading branch information
naskio committed Apr 25, 2023
2 parents 31ffc52 + 8d1c5f2 commit 3aab336
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
context: ./images/strapi-debian
build-args: |
STRAPI_VERSION=${{steps.vars.outputs.tag}}
NODE_VERSION=14
NODE_VERSION=18
# platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
Expand All @@ -55,7 +55,7 @@ jobs:
context: ./images/strapi-alpine
build-args: |
STRAPI_VERSION=${{ steps.vars.outputs.tag }}
NODE_VERSION=14
NODE_VERSION=18
# platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
Expand All @@ -79,4 +79,4 @@ jobs:
with:
tag_name: v${{steps.vars.outputs.tag}}
release_name: Release ${{steps.vars.outputs.tag}}
body: strapi v${{steps.vars.outputs.tag}}
body: strapi v${{steps.vars.outputs.tag}}
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ API with no effort.
Using Docker Compose, create `docker-compose.yml` file with the following content:

```yaml
version: '3'
version: "3"
services:
strapi:
image: naskio/strapi
environment:
NODE_ENV: development # or production
ports:
- '1337:1337'
- "1337:1337"
# volumes:
# - ./app:/srv/app # mount an existing strapi project
```
Expand Down Expand Up @@ -82,17 +82,17 @@ command.

To run an existing project, you can mount the project folder in the container at `/srv/app`.

--------------------------------------------------------------------------------
---

# Recommended way to deploy an existing strapi project to production using Docker

To deploy an existing strapi project to production using Docker, it is recommended to build an image for your project
based on [node v14](https://hub.docker.com/_/node).
based on [node v18](https://hub.docker.com/_/node).

Example of Dockerfile:

```dockerfile
FROM node:14
FROM node:18
# alternatively you can use FROM strapi/base:latest

# Set up working directory
Expand Down Expand Up @@ -130,4 +130,4 @@ CMD ["yarn", "start"]
- The official documentation of strapi is available on [https://docs.strapi.io/](https://docs.strapi.io/).

- The official strapi docker image is available on [GitHub](https://github.com/strapi/strapi-docker) (not yet upgraded
to v4).
to v4).
2 changes: 1 addition & 1 deletion images/strapi-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# BASE
ARG NODE_VERSION=14
ARG NODE_VERSION=18
FROM node:${NODE_VERSION}-alpine AS base-alpine
EXPOSE 1337

Expand Down
2 changes: 1 addition & 1 deletion images/strapi-debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# BASE
ARG NODE_VERSION=14
ARG NODE_VERSION=18
FROM node:${NODE_VERSION} AS base-debian
EXPOSE 1337

Expand Down

0 comments on commit 3aab336

Please sign in to comment.