Skip to content

buildwithdan/flask-portfolio

Repository files navigation

Flask Portfolio Template

Craft your digital presence with Flask. A comprehensive portfolio template to showcase your work and insights.

User Showcase | Docker Image | License

Visitor Badge Deploy with Vercel License MIT Docker Pulls

🛠️ Stack

🗂️ Directory & Configuration

config.ini

Located under api/config.ini, this configuration file lets you input key information such as:

  • Name
  • Email
  • Domain
  • Social media links

By populating this file, you enable the automatic update of the entire Flask app with your personal information. Ensure to fill out every detail correctly to reflect your identity throughout the app.

✅ TODO

  • Add comments to the blog (completed: 2023.08.11)
  • Create config.ini for all variables (completed: 2023.08.11)

📝 Using Markdown for Blog and Project Posts

Utilize the provided templates for creating content:

For assistance with markdown syntax, visit Markdown Live Preview.

Blog Post Structure

Example Here

Activating Blog Comments

  1. Create a new public repo named my-blog-comments.
  2. Enter YourGithubName/my-blog-comments inside Config.ini.
  3. Test your first post which will prompt you to install the app, directing it to your my-blog-comments repo.

Credit: https://utteranc.es/

Project Post Structure

Example Here

🚀 Local Development

Ensure you have the latest versions of Python and Flask. Then, follow these steps:

git clone https://github.com/buildwithdan/flask-portfolio.git
cd flask-portfolio
flask --debug --app api/index.py run

🐳 Docker Deployment

Note: This Docker setup was crafted primarily for educational purposes. If you intend to modify website content, clone or fork the original project, then adjust the HTML files under api/templates. Subsequently, rebuild the Docker image for deployment.

To build the Docker image, use:

docker build -t appname .

Docker Run Command

Replace the following paths to your own local machine folders you created, to allow docker to use your own markdown files:
"/path/to/blogs" "/path/to/projects"

docker run -d \
  --name=flask-portfolio \
  -p 5002:5000 \
  -v /path/to/blogs:/app/api/content/blogs \
  -v /path/to/projects:/app/api/content/projects \
  --restart unless-stopped \
  buildwithdan/flask-portfolio

As example:

docker run -d \
  --name=flask-portfolio \
  -p 5002:5000 \
  -v /home/root/website/blogs:/app/api/content/blogs \
  -v /home/root/website/projects:/app/api/content/projects \
  --restart unless-stopped \
  buildwithdan/flask-portfolio

For detailed Docker CLI info, refer to the official documentation.

🍴 Cloning / Forking

Kindly consult the license and erase all personal details (resume, blog entries, images, etc.) from your cloned/forked version.