Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tarikkavaz committed Feb 28, 2023
0 parents commit 2f8d169
Show file tree
Hide file tree
Showing 277 changed files with 25,023 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
data
/frontend/utils/api.js
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Nuxt 3 & Strapi 4 in Docker

This is a Boilerplate made with [Nuxt.js 3](https://nuxt.com/) and [Strapi 4](https://docs.strapi.io/dev-docs/quick-start#_1-install-strapi-and-create-a-new-project) wrapped in a Docker Container.

## Installation

```bash
git clone [email protected]:tarikkavaz/N3S4D.git
cd NuxtStrapiDocker #Run all commands from here
cp backend/.env.example backend/.env
cp frontend/utils/api.js.example frontend/utils/api.js
yarn install
yarn setup

```

## Run Development Server
```bash
yarn dev #open http://localhost:3000/ and http://localhost:1337/
```
## Run Docker
```bash
docker-compose up #open http://localhost/ and http://localhost/admin/
```
## Setup Admin
1. Open Strapi Admin and create an account
2. Under **Users & Permissions** open the **Roles Page**
3. Select **Public** and give your Collection Type `find` and `findOne` permitions.
![Permissions](Readme/Readme1.png)
4. Add some content in Content Manager. Don't forget to **Publish!**
5. Repeat step 4 with **About** and **Homepage**

## Build
Enter your Domain in `frontend/utils/api.js` at line 5
```javascript
import axios from 'axios';

export const baseUrl = process.env.NODE_ENV === 'development'
? 'http://localhost:1337/api'
: 'http://xx.xxx.xx.x';
```

Run
```bash
yarn build
docker-compose up --build

```
Binary file added Readme/Readme1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
16 changes: 16 additions & 0 deletions backend/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{package.json,*.yml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
6 changes: 6 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
HOST=0.0.0.0
PORT=1337
APP_KEYS=ZSssMklqpz0N8z5ms9qqdg==,zKXU1c3sM0ZUSfuFBKaDjw==,lUR2kvsFyWBQ+YU9bXOceg==,rNFjE5T3aoupLyJaIF6Mbw==
API_TOKEN_SALT=SlMqgI9Nv5zfZWKsKljkJQ==
ADMIN_JWT_SECRET=q2Thy/3G2fRhX2xDr46Jug==
JWT_SECRET=G2SM3NjNM8Z0rDT3tTJIJQ==
3 changes: 3 additions & 0 deletions backend/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.cache
build
**/node_modules/**
27 changes: 27 additions & 0 deletions backend/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parser": "babel-eslint",
"extends": "eslint:recommended",
"env": {
"commonjs": true,
"es6": true,
"node": true,
"browser": false
},
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": false
},
"sourceType": "module"
},
"globals": {
"strapi": true
},
"rules": {
"indent": ["error", 2, { "SwitchCase": 1 }],
"linebreak-style": ["error", "unix"],
"no-console": 0,
"quotes": ["error", "single"],
"semi": ["error", "always"]
}
}
115 changes: 115 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
############################
# OS X
############################

.DS_Store
.AppleDouble
.LSOverride
Icon
.Spotlight-V100
.Trashes
._*


############################
# Linux
############################

*~


############################
# Windows
############################

Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msm
*.msp


############################
# Packages
############################

*.7z
*.csv
*.dat
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.com
*.class
*.dll
*.exe
*.o
*.seed
*.so
*.swo
*.swp
*.swn
*.swm
*.out
*.pid


############################
# Logs and databases
############################

.tmp
*.log
*.sql
*.sqlite
*.sqlite3


############################
# Misc.
############################

*#
ssl
.idea
nbproject
public/uploads/*
!public/uploads/.gitkeep

############################
# Node.js
############################

lib-cov
lcov.info
pids
logs
results
node_modules
.node_history

############################
# Tests
############################

testApp
coverage

############################
# Strapi
############################

.env
license.txt
exports
*.cache
dist
# build
.strapi-updater.json
7 changes: 7 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:14.19.1
WORKDIR /app/backend
COPY package*.json ./
RUN yarn install
COPY . .
EXPOSE 1337
CMD ["yarn", "start"]
57 changes: 57 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 🚀 Getting started with Strapi

Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html) (CLI) which lets you scaffold and manage your project in seconds.

### `develop`

Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-develop)

```
npm run develop
# or
yarn develop
```

### `start`

Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-start)

```
npm run start
# or
yarn start
```

### `build`

Build your admin panel. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-build)

```
npm run build
# or
yarn build
```

## ⚙️ Deployment

Strapi gives you many possible deployment options for your project. Find the one that suits you on the [deployment section of the documentation](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/deployment.html).

## 📚 Learn more

- [Resource center](https://strapi.io/resource-center) - Strapi resource center.
- [Strapi documentation](https://docs.strapi.io) - Official Strapi documentation.
- [Strapi tutorials](https://strapi.io/tutorials) - List of tutorials made by the core team and the community.
- [Strapi blog](https://docs.strapi.io) - Official Strapi blog containing articles made by the Strapi team and the community.
- [Changelog](https://strapi.io/changelog) - Find out about the Strapi product updates, new features and general improvements.

Feel free to check out the [Strapi GitHub repository](https://github.com/strapi/strapi). Your feedback and contributions are welcome!

## ✨ Community

- [Discord](https://discord.strapi.io) - Come chat with the Strapi community including the core team.
- [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.
- [Awesome Strapi](https://github.com/strapi/awesome-strapi) - A curated list of awesome things related to Strapi.

---

<sub>🤫 Psst! [Strapi is hiring](https://strapi.io/careers).</sub>
2 changes: 2 additions & 0 deletions backend/build/1734.b3025a17.chunk.js

Large diffs are not rendered by default.

Binary file added backend/build/19eb2dfcf2603eb55733.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added backend/build/27d16aefee06412db90a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions backend/build/3219.ae4a8552.chunk.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2f8d169

Please sign in to comment.