An open API service indexing awesome lists of open source software.

https://github.com/imvickykumar999/flask-crud-admin

Admin Panel with Reset Password Feature
https://github.com/imvickykumar999/flask-crud-admin

crud-application docker-image flask-admin gunicorn-web-server

Last synced: 3 months ago
JSON representation

Admin Panel with Reset Password Feature

Awesome Lists containing this project

README

          

# `Flask CRUD Admin`

docker pull imvickykumar999/flask-admin:latest
docker run -p 5000:5000 imvickykumar999/flask-admin:latest

[![image](https://github.com/user-attachments/assets/67a58058-6b4c-464e-bcd3-bf343ca10bf1)](https://hub.docker.com/r/imvickykumar999/flask-admin)

## Pull Docker Image: (to run without building)

docker pull ghcr.io/imvickykumar999/flask-cms-gunicorn:latest
docker run -p 5000:5000 ghcr.io/imvickykumar999/flask-cms-gunicorn:latest

## To run locally using Docker:

```bash
docker-compose up --build
```

- This will build the image (if needed) and start the Flask app at [http://localhost:5000](http://localhost:5000).

- To stop the app, press `Ctrl+C` or run:
```bash
docker-compose down
```

![image](https://github.com/user-attachments/assets/62c24b0f-4f7b-4715-a9bd-90fc2ba985cb)
![image](https://github.com/user-attachments/assets/7eef460a-e396-4d7b-8fb3-545f11173111)
![image](https://github.com/user-attachments/assets/a021a015-2e98-40f4-948a-fc6906120e99)
![image](https://github.com/user-attachments/assets/30077fa2-5a55-4667-b958-f0357bb3735f)
![image](https://github.com/user-attachments/assets/0d22b4f9-703f-4770-9701-f5aab0947369)
![image](https://github.com/user-attachments/assets/c7d2fc00-f347-4faf-ba3f-177c915ad55f)
![image](https://github.com/user-attachments/assets/cfcdb495-a5db-483b-96d2-a66aa27864c7)

---

## 🐳 Step-by-Step: Run Your Flask Blog with Docker

---

### ✅ 1. **Create a `Dockerfile` in your project root**

```Dockerfile
# Use official Python image
FROM python:3.10-slim

# Set working directory inside container
WORKDIR /app

# Copy your project files
COPY . /app

# Install dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt

# Expose the port Flask runs on
EXPOSE 5000

# Run your app
CMD ["python", "app.py"]
```

---

### ✅ 2. **Create `requirements.txt`** (if not already)

Generate it with:

```bash
pip freeze > requirements.txt
```

✅ This should include things like:

```txt
Flask
Flask-Admin
Flask-Login
Flask-SQLAlchemy
Flask-CKEditor
Flask-Babel
```

---

### ✅ 3. **Create `.dockerignore` (optional but recommended)**

```txt
venv/
__pycache__/
*.pyc
*.db
.env
```

---

### ✅ 4. **Build Your Docker Image**

From the root of your project (where `Dockerfile` lives):

```bash
docker build -t flask-cms .
```

---

### ✅ 5. **Run the Container**

```bash
docker run -d -p 5000:5000 flask-cms
```

Then open your browser:

📍 [http://localhost:5000](http://localhost:5000)

---

## 🧠 Bonus: Use Docker Volume for SQLite DB Persistence

To save your `cms.db` outside the container:

```bash
docker run -d -p 5000:5000 \
-v $(pwd)/cms.db:/app/cms.db \
flask-cms
```

---

## 🧠 Optional: Use `docker-compose`

If you want to add a database like PostgreSQL later, use `docker-compose.yml`. I can provide that too.

---

### ✅ Summary

| Task | Command |
| ----------- | ---------------------------------------------- |
| Build image | `docker build -t flask-cms .` |
| Run app | `docker run -p 5000:5000 flask-cms` |
| View app | [http://localhost:5000](http://localhost:5000) |

---