A personal portfolio website built with Phoenix LiveView.
-
Configure environment variables:
cp .env.example .env # Copy the example file # Edit .env with your desired admin credentials
-
Install dependencies:
mix setup
-
Start the Phoenix server:
mix phx.server
-
Visit
localhost:4000from your browser.
To access the admin panel for managing blogs:
-
Set admin credentials in
.env:ADMIN_USERNAME=admin ADMIN_PASSWORD=password
-
Visit
/admin/loginand log in with your credentials.Current admin credentials (from
.env):- Username:
admin - Password:
password
- Username:
This app is compatible with free hosting services:
- Connect your GitHub repository
- Set these environment variables:
ADMIN_USERNAME=adminADMIN_PASSWORD=your_secure_passwordDATABASE_URL=ecto://...(Railway provides this)SECRET_KEY_BASE=$(mix phx.gen.secret)LIVEVIEW_SIGNING_SALT=$(mix phx.gen.secret 32)
- Deploy automatically
- Create a new Web Service
- Connect your GitHub repo
- Set build command:
mix do deps.get, compile - Set start command:
mix phx.server - Configure environment variables as above
- Install flyctl:
curl -L https://fly.io/install.sh | sh - Run
fly launch - Set secrets:
fly secrets set ADMIN_PASSWORD=your_password
Required for production:
# Admin credentials
ADMIN_USERNAME=admin
ADMIN_PASSWORD=your_secure_password
# Database
DATABASE_URL=ecto://username:password@host/database
# Phoenix secrets (generate with mix phx.gen.secret)
SECRET_KEY_BASE=your_secret_key_base
LIVEVIEW_SIGNING_SALT=your_signing_salt
# Optional
PHX_HOST=your-domain.com
PORT=4000- Never commit sensitive environment variables to version control
- Use strong, unique passwords
- Generate new secret keys for production
- Enable HTTPS in production
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix