• Stars
    star
    115
  • Rank 295,699 (Top 6 %)
  • Language
    Shell
  • License
    MIT License
  • Created about 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Docker image for strapi v4 (latest version)

strapi (v4+) containerized

Strapi

Docker image for strapi version 4 (latest version)

API creation made simple, secure and fast. The most advanced open-source Content Management Framework to build powerful API with no effort.

GitHub repository

Docker Hub

Docker Pulls


Example

Using Docker Compose, create docker-compose.yml file with the following content:

version: "3"
services:
  strapi:
    image: naskio/strapi
    environment:
      NODE_ENV: development # or production
    ports:
      - "1337:1337"
    # volumes:
    #   - ./app:/srv/app # mount an existing strapi project

or using Docker:

docker run -d -p 1337:1337 naskio/strapi --env NODE_ENV=development

You can find more example on GitHub.


How to use ?

This image allows you to create a new strapi project or run an existing strapi project.

  • for $NODE_ENV = development: The command that will run in your project is strapi develop.
  • for $NODE_ENV = production: The command that will run in your project is strapi start.

The Content-Type Builder plugin is disabled WHEN $NODE_ENV = production.

Creating a new strapi project

When running this image, strapi will check if there is a project in the /srv/app folder of the container. If there is nothing then it will run the strapi new command in the container /srv/app folder.

This command creates a project with an SQLite database. Then starts it on port 1337.

Environment variables

When creating a new project with this image you can pass database configurations to the strapi new command.

  • DATABASE_CLIENT a database provider supported by Strapi: (sqlite, postgres, mysql ,mongo).
  • DATABASE_HOST database host.
  • DATABASE_PORT database port.
  • DATABASE_NAME database name.
  • DATABASE_USERNAME database username.
  • DATABASE_PASSWORD database password.
  • DATABASE_SSL boolean for SSL.
  • EXTRA_ARGS pass extra args to the strapi new.

Running an existing strapi project

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 v18.

Example of Dockerfile:

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

# Set up working directory
WORKDIR /app

# Copy package.json to root directory
COPY package.json .

# Copy yarn.lock to root directory
COPY yarn.lock .

# Install dependencies, but not generate a yarn.lock file and fail if an update is needed
RUN yarn install --frozen-lockfile

# Copy strapi project files
COPY favicon.ico ./favicon.ico
COPY src/ src/
COPY public/ public/
COPY database/ database/
COPY config/ config/
# ...

# Build admin panel
RUN yarn build

# Run on port 1337
EXPOSE 1337

# Start strapi server
CMD ["yarn", "start"]

Official Documentation

  • The official documentation of strapi is available on https://docs.strapi.io/.

  • The official strapi docker image is available on GitHub (not yet upgraded to v4).

More Repositories

1

n8n-nodes-python

Run Python code on n8n
TypeScript
81
star
2

po-auto-translation

translate PO files automatically for FREE using google translate
JavaScript
37
star
3

docker-n8n-python

Docker image for running Python on n8n
Dockerfile
37
star
4

n8n-nodes-changed

n8n node to redirect the stream based on if the input has changed between the current and the previous execution or not.
TypeScript
18
star
5

docx-viewer

Live Preview the generated word document (docx) in your browser while using https://docx.js.org/
JavaScript
17
star
6

n8n-nodes-updates

Split stream based on previous execution: new items, updated items, old items
TypeScript
13
star
7

neon8n

Docker image of an enhanced version of n8n
Dockerfile
12
star
8

n8n-nodes-influxdb

InfluxDB 2.x node for n8n.
TypeScript
8
star
9

watermark-remover

Remove watermarks from images, Word and PDF
Tcl
7
star
10

docker-compose-manager

Bash script to manage multiple docker-compose files (stacks)
Shell
7
star
11

YouLoader

Online tool to download music from Youtube for FREE without Ads
JavaScript
7
star
12

DAAR_project_3

Project 03 (CV Catcher): indexing CVs (PDF, Word, PNG and JPEG) in ElasticSearch.
Python
4
star
13

awesome-docker-compose

Collection of awesome Docker Compose files.
Shell
3
star
14

woocommerce-to-facebook-shop

Export WooCommerce products to Facebook Shop online
JavaScript
3
star
15

auto-reverse-proxy

Deploy multiple containerized web apps in the same Server (VPS, ...) using Docker and NGINX as a reverse proxy
Shell
3
star
16

sayara-dz-fabriquant

SayaraDz is a marketplace to buy or sell your car, it provides a web application for constructor to manage their brand and sell their cars. It is also available as a mobile application which is destined to motorists where they can buy a new car or post a new announce to sell their cars, they can also do an offer as a response to an announce.
JavaScript
3
star
17

arabic-dev

Python
2
star
18

DAAR_4_BookFinder

Search engine for free books
JavaScript
2
star
19

chaquopy-mishkal

example of running a Python library (mishkal) in Android using chaquopy
Kotlin
2
star
20

monit-docker

Monit setup for docker single-host monitoring (host, docker daemon and docker containers) with UI
Shell
2
star
21

docker-grafana

Docker Compose configuration file for Grafana, ready to use
Shell
1
star
22

selly-frontend

Selly | Your virtual assistant to e-commerce //Slash Berlin hackathon
JavaScript
1
star
23

jekyll-actions-example

using the new feature: GitHub Pages - Custom GitHub Actions Workflows (beta)
HTML
1
star
24

Dz-Now-Mobile

Mobile App for news in Algeria (Dz Now)
Kotlin
1
star
25

greena-backend

Junction 2019
JavaScript
1
star
26

naskpy

Python utilities for scripting and automation
Python
1
star
27

gr-contributors

Sample repository for testing github/contributors
1
star
28

static-website-boilerplate

Static Website BoilerPlate Using (ES6, Bootstrap 4, SASS, ROBOTO)
JavaScript
1
star
29

docker-ToolJet

Docker compose configuration for ToolJet, ready to use
Shell
1
star
30

Hackerrank-Non-Divisible-Subset

Solution for the problem "Non-Divisible Subset",Hackerrank,JAVA
Java
1
star
31

pomodoro-timer-extension

"Pomodoro Timer" is a tool that uses the pomodoro technique "a time management technique" to help you managing your time better.
JavaScript
1
star
32

pomodoro-timer-web

"Pomodoro Timer" is a tool that uses the pomodoro technique "a time management technique" to help you managing your time better.
JavaScript
1
star
33

pomodoro-timer-mobile

"Pomodoro Timer" is a tool that uses the pomodoro technique "a time management technique" to help you managing your time better.
JavaScript
1
star
34

jekyll-folder-example

Jekyll example where we use a folder `Docs/` for hosting the website.
JavaScript
1
star
35

pomodoro-timer-desktop

"Pomodoro Timer" is a tool that uses the pomodoro technique "a time management technique" to help you managing your time better.
JavaScript
1
star