https://github.com/trydma/nextjs-strapi-nginx-docker
Boilerplate for building a web application.
https://github.com/trydma/nextjs-strapi-nginx-docker
certbot docker nextjs nginx postgresql strapi
Last synced: about 1 year ago
JSON representation
Boilerplate for building a web application.
- Host: GitHub
- URL: https://github.com/trydma/nextjs-strapi-nginx-docker
- Owner: trydma
- License: mit
- Created: 2024-02-25T15:30:13.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-23T19:45:47.000Z (over 1 year ago)
- Last Synced: 2025-03-29T06:11:21.478Z (about 1 year ago)
- Topics: certbot, docker, nextjs, nginx, postgresql, strapi
- Language: TypeScript
- Homepage:
- Size: 610 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Boilerplate for building a web application.
Next.js, Strapi, PostgreSQL, Nginx, Docker.
## Instruction 📖
- In the Docker folder, configure the environment.
- Start development and customize strapi.
- Add the resulting strapi token to the environment (it will be available on the frontend).
- On production, configure the nginx configuration for your domain. Also change the environment for production.
- Get ssl certificate using certbot for your server.
## Docker 🐳
#### Running containers for development
```
docker-compose -f development.compose.yml up --build
```
#### Running containers for production
```
docker-compose -f production.compose.yml up -d --build
```
#### Removing containers
```
docker-compose -f *.compose.yml down
```
## Strapi 🛠️
#### Data export without encryption and compression
```
npm run strapi export -- --no-encrypt --no-compress
```
#### Data import
```
npm run strapi import -- -f name_import_file.tar
```
## Certbot 🤖
#### Obtaining ssl certificate
```
docker-compose -f production.compose.yml run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ -d [domain-name]
```