|
1 |
| -# 🚀 Getting started with Strapi |
| 1 | +# Web - CMS |
2 | 2 |
|
3 |
| -Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/dev-docs/cli) (CLI) which lets you scaffold and manage your project in seconds. |
| 3 | +This repository contains the code for the CMS or Content Management System to serve manageable content to be rendered by the [web-frontend](https://github.com/starpep-web/web-frontend). |
4 | 4 |
|
5 |
| -### `develop` |
| 5 | +## Requirements |
6 | 6 |
|
7 |
| -Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-develop) |
| 7 | +In order to develop for this repository you need: |
8 | 8 |
|
9 |
| -``` |
10 |
| -npm run develop |
11 |
| -# or |
12 |
| -yarn develop |
13 |
| -``` |
| 9 | +* [Node.js v20.18.0](https://nodejs.org/en) (but any `v20` should work fine) |
| 10 | +* [Docker](https://www.docker.com/products/docker-desktop/) |
14 | 11 |
|
15 |
| -### `start` |
| 12 | +## Development |
16 | 13 |
|
17 |
| -Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-start) |
| 14 | +First, clone this repository: |
18 | 15 |
|
| 16 | +```bash |
| 17 | +git clone https://github.com/starpep-web/web-cms |
19 | 18 | ```
|
20 |
| -npm run start |
21 |
| -# or |
22 |
| -yarn start |
| 19 | + |
| 20 | +Install the dependencies: |
| 21 | + |
| 22 | +```bash |
| 23 | +npm install |
23 | 24 | ```
|
24 | 25 |
|
25 |
| -### `build` |
| 26 | +Create an `.env` file with the following contents: |
26 | 27 |
|
27 |
| -Build your admin panel. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-build) |
| 28 | +```text |
| 29 | +HOST=0.0.0.0 |
| 30 | +PORT=1337 |
| 31 | +APP_KEYS="toBeModified1,toBeModified2" |
| 32 | +API_TOKEN_SALT=tobemodified |
| 33 | +ADMIN_JWT_SECRET=tobemodified |
| 34 | +TRANSFER_TOKEN_SALT=tobemodified |
28 | 35 |
|
| 36 | +DATABASE_CLIENT=sqlite |
| 37 | +DATABASE_FILENAME=.tmp/data.db |
| 38 | +JWT_SECRET=tobemodified |
29 | 39 | ```
|
30 |
| -npm run build |
31 |
| -# or |
32 |
| -yarn build |
| 40 | + |
| 41 | +Run the `develop` script: |
| 42 | + |
| 43 | +```bash |
| 44 | +npm run develop |
33 | 45 | ```
|
34 | 46 |
|
35 |
| -## ⚙️ Deployment |
| 47 | +And done, the service should be reachable at `http://localhost:1337/admin`. |
36 | 48 |
|
37 |
| -Strapi gives you many possible deployment options for your project including [Strapi Cloud](https://cloud.strapi.io). Browse the [deployment section of the documentation](https://docs.strapi.io/dev-docs/deployment) to find the best solution for your use case. |
| 49 | +### First Time Setup |
38 | 50 |
|
39 |
| -``` |
40 |
| -yarn strapi deploy |
41 |
| -``` |
| 51 | +The first time you start the Strapi development server you will be prompted to create an account. Once you have one set up, you should head over to `Settings` > `API Tokens` and create a new `Read-only` token with no expiration. This token should be used to connect Strapi to [web-frontend](https://github.com/starpep-web/web-frontend). For more information, check out the instructions for that repo to understand where to use the generated API key. |
42 | 52 |
|
43 |
| -## 📚 Learn more |
| 53 | +## Building |
44 | 54 |
|
45 |
| -- [Resource center](https://strapi.io/resource-center) - Strapi resource center. |
46 |
| -- [Strapi documentation](https://docs.strapi.io) - Official Strapi documentation. |
47 |
| -- [Strapi tutorials](https://strapi.io/tutorials) - List of tutorials made by the core team and the community. |
48 |
| -- [Strapi blog](https://strapi.io/blog) - Official Strapi blog containing articles made by the Strapi team and the community. |
49 |
| -- [Changelog](https://strapi.io/changelog) - Find out about the Strapi product updates, new features and general improvements. |
| 55 | +If you're developing this on your local machine, consider building the Docker image with the following command: |
50 | 56 |
|
51 |
| -Feel free to check out the [Strapi GitHub repository](https://github.com/strapi/strapi). Your feedback and contributions are welcome! |
| 57 | +```bash |
| 58 | +docker build -t local-starpep/web-cms:latest . |
| 59 | +``` |
| 60 | + |
| 61 | +You can create a new container to try it out with the following command: |
52 | 62 |
|
53 |
| -## ✨ Community |
| 63 | +```bash |
| 64 | +docker run -it --rm -p 1337:1337 local-starpep/web-cms:latest |
| 65 | +``` |
54 | 66 |
|
55 |
| -- [Discord](https://discord.strapi.io) - Come chat with the Strapi community including the core team. |
56 |
| -- [Forum](https://forum.strapi.io/) - Place to discuss, ask questions and find answers, show your Strapi project and get feedback or just talk with other Community members. |
57 |
| -- [Awesome Strapi](https://github.com/strapi/awesome-strapi) - A curated list of awesome things related to Strapi. |
| 67 | +And done, the service should be reachable at `http://localhost:1337/admin`. |
58 | 68 |
|
59 |
| ---- |
| 69 | +## Production |
60 | 70 |
|
61 |
| -<sub>🤫 Psst! [Strapi is hiring](https://strapi.io/careers).</sub> |
| 71 | +Consider checking this [docker-compose.yml](https://github.com/starpep-web/env-production/blob/main/docker-compose.yml) for an example on how to run this image in production. |
0 commit comments