Skip to content
Closed
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
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name: CI-pipeline
on:
workflow_dispatch:
push:
branches:
- dev

pull_request:
branches:
- main
types:
- opened

jobs:
linters:
Expand Down Expand Up @@ -57,9 +55,6 @@ jobs:
Repository: ${{ github.repository }}
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}

- name: Check fail
run: echo "Unreachable"

- name: Notify in telegram about success
uses: appleboy/telegram-action@master
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- main
types:
- closed
paths:
- Dockerfile
- requirements.txt
- manage.py

jobs:
build-and-push:
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY ./mysite ./mysite
COPY ./polls ./polls
COPY ./manage.py .

RUN ./manage.py makemigrations
Expand Down
26 changes: 20 additions & 6 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
services:
app:
container_name: wtukatyr/django-example-app:latest
django-app:
image: wtukatyr/django-example-app:latest
container_name: django-app
ports:
- "8989:8000"
depends_on:
- db
volumes:
./mysite:/app/mysite
./polls:/app/polls
environment:
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_USERNAME: ${DATABASE_USERNAME}
Expand All @@ -14,7 +18,9 @@ services:
env_file:
- .env
networks:
- proxy-common
- django_app_network
- proxy_common

db:
image: postgres:14
restart: always
Expand All @@ -30,13 +36,21 @@ services:
volumes:
- pg-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: sa
POSTGRES_PASSWORD: example
POSTGRES_PORT: 5432
POSTGRES_DB: ${DATABASE_NAME}
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_PORT: ${DATABASE_PORT}
env_file:
- .env
networks:
- django_app_network
- proxy_common

volumes:
pg-data:

networks:
django_app_network:
name: django_app_network
proxy_common:
external: true
2 changes: 1 addition & 1 deletion mysite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ["localhost"]
ALLOWED_HOSTS = ["localhost", "app.saccada.xyz"]


# Application definition
Expand Down