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
10 changes: 6 additions & 4 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -103,6 +103,8 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.django
load: ${{ github.event_name == 'pull_request' }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand All @@ -112,7 +114,7 @@ jobs:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ steps.meta.outputs.tags }}
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:sha-${{ github.sha }}
format: 'table'
exit-code: '1'
ignore-unfixed: true
Expand Down
25 changes: 11 additions & 14 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,23 @@ techblog_cms is a Django-based technical blog content management system. It oper
## Project Structure
```
techblog_cms/
├── app/ # Django application
│ ├── techblog_cms/ # Main Django app
│ │ ├── __init__.py
│ │ ├── settings.py # Django settings (using environment variables)
│ │ ├── urls.py # URL mapping
│ │ ├── views.py # View functions
│ │ ├── wsgi.py # WSGI entry point
│ │ └── templates/ # HTML templates
│ └── requirements.txt # Python dependencies
├── techblog_cms/ # Django application
│ ├── settings.py # Django settings (using environment variables)
│ ├── urls.py # URL mapping
│ ├── views.py # View functions
│ ├── wsgi.py # WSGI entry point
│ ├── templates/ # HTML templates
│ └── tests/ # Test files
├── nginx/ # Nginx configuration
│ ├── conf.d/
│ │ └── default.conf # Nginx configuration file
│ └── Dockerfile # Nginx container definition
│ └── conf.d/
│ └── default.conf # Nginx configuration file
├── scripts/ # Utility scripts
│ ├── init-letsencrypt.sh # Initialize SSL certificate
│ └── renew-cert.sh # Renew SSL certificate
├── static/ # Static files
├── tests/ # Test files
├── docker-compose.yml # Container orchestration
├── Dockerfile.* # Various Dockerfiles
├── Dockerfile.django # Django container definition
├── Dockerfile.nginx # Nginx container definition
├── requirements.txt # Project-wide dependencies
└── pytest.ini # pytest configuration
```
Expand Down
15 changes: 0 additions & 15 deletions Dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions Dockerfile.django
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ ENV PYTHONUNBUFFERED=1

# Copy requirements first for better caching
COPY requirements.txt .
RUN pip install --upgrade pip setuptools wheel
RUN pip install -r requirements.txt

# Copy project files
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile.nginx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ RUN rm /etc/nginx/conf.d/default.conf
# Copy configuration and static files
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY static /var/www/static

# Set proper permissions for static files
RUN chown -R nginx:nginx /var/www/static
RUN mkdir -p /var/www/static && chown -R nginx:nginx /var/www/static

# Expose ports
EXPOSE 80
Expand Down
24 changes: 0 additions & 24 deletions Dockerfile.nginx.static

This file was deleted.

25 changes: 0 additions & 25 deletions app/Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions app/requirements.txt

This file was deleted.

1 change: 0 additions & 1 deletion app/techblog_cms/__init__.py

This file was deleted.

75 changes: 0 additions & 75 deletions app/techblog_cms/migrations/0001_initial.py

This file was deleted.

49 changes: 0 additions & 49 deletions app/techblog_cms/models.py

This file was deleted.

89 changes: 0 additions & 89 deletions app/techblog_cms/settings.py

This file was deleted.

5 changes: 0 additions & 5 deletions app/techblog_cms/urls.py

This file was deleted.

3 changes: 0 additions & 3 deletions app/techblog_cms/views.py

This file was deleted.

Loading
Loading