Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ __pycache__
.venv
docker-compose.yml
Dockerfile
venv/
**/.DS_Store
dist/
7 changes: 2 additions & 5 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ npm run build-css-prod
### Running the Application
```bash
# Development (port 3000, debug mode)
python app.py

# Flask CLI alternative
export FLASK_APP=app.py && flask run
uv run app.py
```

## Project-Specific Conventions
Expand Down Expand Up @@ -79,7 +76,7 @@ export FLASK_APP=app.py && flask run

### Port Configuration
- Development: Port 3000 (`python app.py`)
- Production: Port 5000 (Docker container)
- Production: Port 3000 (Docker container)
- Flask runs with `host="0.0.0.0"` for container compatibility

### Directory Auto-Creation
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,17 @@ jobs:
node-version: '18'
cache: 'npm'

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
# Pin to uv version 0.7
version: "0.7"

- name: Set up Python
run: uv python install

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
run: uv sync --locked --all-extras --dev

- name: Install Node.js dependencies
run: npm install
Expand All @@ -57,7 +64,7 @@ jobs:

- name: Build static site
run: |
python build.py
uv run build.py

- name: Setup Pages
uses: actions/configure-pages@v4
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
__pycache__/
.venv
node_modules/
.dist
.dist
venv/
**/.DS_Store
dist/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
26 changes: 18 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ ENV FLASK_ENV=production

# Set work directory
WORKDIR /app

# Install uv and python dependencies
COPY --from=ghcr.io/astral-sh/uv:0.7 /uv /uvx /bin/
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --locked --no-install-project

# Copy application code
COPY . .

# Install system dependencies
Expand All @@ -23,16 +32,14 @@ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs


# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Sync the project
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked

# Copy package.json and install Node dependencies
COPY package.json .
RUN npm install

# Copy application code
COPY . .

# Build Tailwind CSS
RUN npm run build-css-prod

Expand All @@ -41,12 +48,15 @@ RUN adduser --disabled-password --gecos '' appuser \
&& chown -R appuser:appuser /app
USER appuser

# Place executables in the environment at the front of the path
ENV PATH="/app/.venv/bin:$PATH"

# Expose port
EXPOSE 5000
EXPOSE 3000

# Health check
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
CMD curl -f http://localhost:5000/ || exit 1
CMD curl -f http://localhost:3000/ || exit 1

# Run the application
CMD ["python", "app.py"]
CMD ["uv", "run", "app.py"]
67 changes: 27 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,42 @@
# DevOps Jogja Community Website
# Website Komunitas DevOps Jogja

Modern community website untuk DevOps Jogja yang dibangun dengan Flask dan Tailwind CSS.
Website komunitas modern untuk DevOps Jogja yang dibangun dengan Flask dan Tailwind CSS.

![DevOps Jogja](static/images/cover.png)

## 🚀 Features
## 🚀 Fitur

- **Modern Homepage** - Berkesan teknologi infrastruktur dengan design responsif
- **Blog System** - Artikel teknologi dari file Markdown
- **Modern Homepage** - Kesan teknologi infrastruktur dengan design responsif
- **Blog System** - Artikel dan blog teknologi dari file Markdown
- **Event Management** - Informasi event dari file Markdown
- **Organizer Profiles** - Profil pengurus dari file YAML
- **About Page** - Informasi komunitas dari file YAML
- **Responsive Design** - Menggunakan Tailwind CSS

## 📋 Prerequisites
## 📋 Pra-syarat

- Python 3.8+
- Python 3.11+
- uv 0.7+
- Node.js 14+
- npm atau yarn

## 🛠️ Installation
## 🛠️ Instalasi

### 1. Clone Repository
### 1. Kloning Repositori

```bash
git clone https://github.com/devops-jogja/devops-jogja-website.git
cd devops-jogja-website
```

### 2. Setup Python Environment
### 2. Siapkan 'environment' python

```bash
# Buat virtual environment
python -m venv venv

# Aktivasi virtual environment
# Di macOS/Linux:
source venv/bin/activate
# Di Windows:
# venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt
# Sync 'environment' dengan uv
uv sync --locked
```

### 3. Setup Tailwind CSS
### 3. Siapkan Tailwind CSS

```bash
# Install Node.js dependencies
Expand All @@ -57,25 +49,20 @@ npm run build-css
### 4. Jalankan Aplikasi

```bash
# Development mode
python app.py

# Atau dengan Flask CLI
export FLASK_APP=app.py
export FLASK_ENV=development
flask run
# Dengan uv
uv run app.py
```

Website akan berjalan di `http://localhost:5000`
Website akan berjalan di `http://localhost:3000`

## 📁 Struktur Project

```
devops-jogja-website/
├── app.py # Main Flask application
├── requirements.txt # Python dependencies
├── package.json # Node.js dependencies
├── tailwind.config.js # Tailwind configuration
├── pyproject.toml # Python dependencies
├── package.json # Node.js dependencies
├── tailwind.config.js # Tailwind configuration
├── static/
│ ├── css/
│ │ ├── input.css # Tailwind input
Expand Down Expand Up @@ -110,7 +97,7 @@ devops-jogja-website/
└── yaml_loader.py # YAML loader
```

## 📝 Content Management
## 📝 Manajemen konten

### Blog Posts

Expand Down Expand Up @@ -233,17 +220,17 @@ Tambahkan interaktivitas di `static/js/main.js`.

## 🚀 Deployment

### Using Docker
### Menggunakan Docker

```bash
# Build image
docker build -t devops-jogja-website .

# Run container
docker run -p 5000:5000 devops-jogja-website
docker run -p 3000:3000 devops-jogja-website
```

### Using Heroku
### Menggunakan Heroku

```bash
# Login to Heroku
Expand All @@ -256,12 +243,12 @@ heroku create devops-jogja-website
git push heroku main
```

### Using Railway
### Menggunakan Railway

1. Connect GitHub repository ke Railway
1. Hubungkan GitHub repository ke Railway
2. Deploy otomatis setiap push ke main branch

## 🤝 Contributing
## 🤝 Berkontribusi

1. Fork repository
2. Buat feature branch (`git checkout -b feature/amazing-feature`)
Expand Down
2 changes: 1 addition & 1 deletion dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ install_deps() {

# Install Python dependencies
print_status "Installing Python dependencies..."
pip3 install -r requirements.txt
uv sync --locked

# Install Node.js dependencies
print_status "Installing Node.js dependencies..."
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ services:
web:
build: .
ports:
- "5000:3000"
- "3000:3000"
environment:
- FLASK_ENV=development
- FLASK_DEBUG=1
volumes:
- .:/app
- /app/node_modules
command: python app.py

production:
build: .
Expand Down
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[project]
name = "website"
version = "1.0.0"
description = "Modern community website untuk DevOps Jogja yang dibangun dengan Flask dan Tailwind CSS"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"flask==2.3.3",
"markdown==3.5.1",
"pillow>=10.1",
"pillow-heif==0.13.0",
"pygments==2.16.1",
"python-dateutil==2.8.2",
"pyyaml==6.0.1",
]
7 changes: 0 additions & 7 deletions requirements.txt

This file was deleted.

Binary file removed static/.DS_Store
Binary file not shown.
Binary file removed static/images/.DS_Store
Binary file not shown.
Loading