-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca0bf41
commit 519901f
Showing
16 changed files
with
237 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
POSTGRES_USER=postgres | ||
POSTGRES_PASSWORD=junction | ||
POSTGRES_DB=junction | ||
HOST_NAME=db | ||
PORT=5432 | ||
BROKER_URL=redis://redis:6379/0 | ||
CELERY_RESULT_BACKEND=redis://redis:6379/0 | ||
TESTING=FALSE | ||
SITE_URL=https://in.pycon.org/junction | ||
SITE_NAME=junction | ||
GOOGLE_ANALYTICS_ID=dummy | ||
FACEBOOK_APP_ID=dummy | ||
EMAIL_HOST_USER=dummy | ||
EMAIL_HOST_PASSWORD=dummy | ||
SECRET_KEY=dummy | ||
TWITTER_CONSUMER_KEY=dummy | ||
TWITTER_CONSUMER_SECRET=dummy | ||
TWITTER_ACCESS_TOKEN_KEY=dummy | ||
TWITTER_ACCESS_TOKEN_SECRET=dummy | ||
USE_ASYNC_FOR_EMAIL=dummy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM python:3.10-slim-buster | ||
|
||
WORKDIR /code | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
gcc \ | ||
postgresql-client \ | ||
build-essential \ | ||
libpq-dev && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
COPY requirements.txt /code/ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Install requirements for running tests | ||
COPY ./tools/requirements-test.txt /code/ | ||
RUN pip install --no-cache-dir -r requirements-test.txt | ||
|
||
COPY . /code/ | ||
# not getting used at this moment | ||
RUN chmod +x wait-for-it.sh | ||
|
||
ENV DJANGO_SETTINGS_MODULE=settings.dev | ||
ENV PYTHONUNBUFFERED=1 | ||
|
||
EXPOSE 8888 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM python:3.10-slim-buster | ||
|
||
# Install system dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
gcc \ | ||
libc-dev \ | ||
libffi-dev \ | ||
make \ | ||
postgresql-client \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Python dependencies | ||
COPY requirements.txt /app/ | ||
RUN pip install --no-cache-dir -r /app/requirements.txt | ||
|
||
# Copy the application code | ||
COPY . /app/ | ||
WORKDIR /app | ||
|
||
# Set environment variables | ||
ENV PYTHONUNBUFFERED 1 | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: '3.8' | ||
|
||
services: | ||
web: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
command: sh -c pytest --cov=unit --cov=integrations --cov-report=html | ||
|
||
volumes: | ||
postgres_data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
version: '3.8' | ||
|
||
services: | ||
db: | ||
image: postgres:15-alpine | ||
environment: | ||
POSTGRES_USER: ${POSTGRES_USER} | ||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | ||
POSTGRES_DB: ${POSTGRES_DB} | ||
ports: | ||
- "5432:5432" | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data/ | ||
|
||
redis: | ||
image: redis:latest | ||
ports: | ||
- "6379:6379" | ||
|
||
celery: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.celery | ||
volumes: | ||
- .:/code | ||
depends_on: | ||
- db | ||
- redis | ||
env_file: | ||
- .env | ||
command: sh -c 'celery -A junction worker -l info -E' | ||
|
||
web: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
volumes: | ||
- .:/code | ||
ports: | ||
- "8888:8888" | ||
depends_on: | ||
- db | ||
- redis | ||
- celery | ||
env_file: | ||
- .env | ||
command: sh -c 'python manage.py migrate && python manage.py runsslserver 0.0.0.0:8888' | ||
|
||
volumes: | ||
postgres_data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from django.conf.urls import url | ||
from django.urls import re_path | ||
|
||
from . import views | ||
|
||
urlpatterns = [url(r"^$", views.get_conference, name="get-conference")] | ||
urlpatterns = [re_path(r"^$", views.get_conference, name="get-conference")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
from django.conf.urls import url | ||
from django.urls import re_path | ||
|
||
from . import views | ||
|
||
app_name = "junction.profiles" | ||
|
||
urlpatterns = [ | ||
url(r"^$", views.dashboard, name="dashboard"), | ||
url(r"^edit/$", views.profile, name="profile"), | ||
re_path(r"^$", views.dashboard, name="dashboard"), | ||
re_path(r"^edit/$", views.profile, name="profile"), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import absolute_import, unicode_literals | ||
|
||
from django.conf.urls import url | ||
from django.urls import re_path | ||
|
||
from . import views | ||
|
||
urlpatterns = [ | ||
# schedule urls | ||
url(r"^dummy_schedule/$", views.dummy_schedule, name="dummy_schedule"), | ||
re_path(r"^dummy_schedule/$", views.dummy_schedule, name="dummy_schedule"), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import absolute_import, unicode_literals | ||
|
||
from django.conf.urls import url | ||
from django.urls import re_path | ||
|
||
from . import views | ||
|
||
urlpatterns = [ | ||
url(r"^sync_data/$", views.sync_data, name="sync_data"), | ||
re_path(r"^sync_data/$", views.sync_data, name="sync_data"), | ||
] |
Oops, something went wrong.