Skip to content

Commit

Permalink
improve guide and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kritserv committed Oct 5, 2023
1 parent fa4881d commit 65a0891
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 32 deletions.
29 changes: 0 additions & 29 deletions DEVELOPER_GUIDE.md

This file was deleted.

43 changes: 42 additions & 1 deletion FIRST_SETUP_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,45 @@ Access the manage.py command from the code-app terminal:
```
python manage.py loaddata dumped_data.json
```
> restore dumped data from dumped_data.json
> restore dumped data from dumped_data.json
<br>

**Done!** Your first-time setup is now completed.

<br>
<br>

#### Other useful command:

- [grant privileges to the root in mysql](#command-to-grant-privileges-to-the-root-user-in-mysql-or-mariadb)

- [fix Nginx Bad Gateway](#command-to-fix-nginx-bad-gateway)

##### command to grant privileges to the root user in MySQL or MariaDB:

```
mysql -u root -p ddice_online_shop_database
```

```
ddice
```
> Password: ddice (same as settings.py)
```
GRANT ALL PRIVILEGES ON ddice_online_shop_database.* TO root@'%';
SHOW GRANTS FOR 'root';
```

##### command to fix Nginx Bad Gateway:

```
sudo netstat -nlp | grep 8000
```

if the PID of that process was 12345, you would use `sudo kill 12345` to terminate that process.

```
sudo kill 12345
```
44 changes: 42 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
# ddice online shop docker django mysql
## Online Ecommerce Shop example using Docker Django Mysql

work in progress..
preview: [ddice.pythonanywhere.com](https://ddice.pythonanywhere.com/)

<center>

![banner](banner.png)

</center>

<br>

highlight feature:

- Filter product form
- Add to Cart, Remove from Cart
- Product summary
- Checkout form
- Guest Account

<br>

### Installation

clone this repository:

```
git clone https://github.com/kritserv/online_shop_docker_django_mysql.git
```

Setup container using Docker compose.

Also follow [First setup guide](FIRST_SETUP_GUIDE.md#first-time-setup-guide).

> **Don't skip** this guide, Django Will **Not** Run Properly If Skipped!
<br>
<br>

### Other useful command:

- [grant privileges to the root in mysql](FIRST_SETUP_GUIDE.md#command-to-grant-privileges-to-the-root-user-in-mysql-or-mariadb)
- [fix Nginx Bad Gateway](FIRST_SETUP_GUIDE.md#command-to-fix-nginx-bad-gateway)
43 changes: 43 additions & 0 deletions README.md.backup
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## Online Ecommerce Shop example using Docker Django Mysql

preview: [ddice.pythonanywhere.com](https://ddice.pythonanywhere.com/)

<center>

![banner](banner.png)

</center>

<br>

highlight feature:

- Filter product form
- Add to Cart, Remove from Cart
- Product summary
- Checkout form
- Guest Account

<br>

### Installation

clone this repository:

```
git clone https://github.com/kritserv/online_shop_docker_django_mysql.git
```

Setup container using Docker compose.

Also follow [First setup guide](FIRST_SETUP_GUIDE.md#first-time-setup-guide).

> **Don't skip** this guide, Django Will **Not** Run Properly If Skipped!

<br>
<br>

### Other useful command:

- [grant privileges to the root in mysql](FIRST_SETUP_GUIDE.md#command-to-grant-privileges-to-the-root-user-in-mysql-or-mariadb)
- [fix Nginx Bad Gateway](FIRST_SETUP_GUIDE.md#command-to-fix-nginx-bad-gateway)
Binary file added banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 65a0891

Please sign in to comment.