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
- Host: GitHub
- URL: https://github.com/imvickykumar999/flask-crud-admin
- Owner: imvickykumar999
- Created: 2025-06-20T08:52:46.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-06-20T10:17:19.000Z (4 months ago)
- Last Synced: 2025-06-20T10:19:58.286Z (4 months ago)
- Topics: crud-application, docker-image, flask-admin, gunicorn-web-server
- Language: HTML
- Homepage: https://blogcms.pythonanywhere.com/
- Size: 20.7 MB
- Stars: 2
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `Flask CRUD Admin`
docker pull imvickykumar999/flask-admin:latest
docker run -p 5000:5000 imvickykumar999/flask-admin:latest[](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
```





---
## 🐳 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) |---