-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
7 changed files
with
159 additions
and
5 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,89 @@ | ||
# Git | ||
.git | ||
.gitignore | ||
.gitattributes | ||
|
||
|
||
# CI | ||
.codeclimate.yml | ||
.travis.yml | ||
.taskcluster.yml | ||
|
||
# Docker | ||
docker-compose.yml | ||
Dockerfile | ||
.docker | ||
.dockerignore | ||
|
||
# Byte-compiled / optimized / DLL files | ||
**/__pycache__/ | ||
**/*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Virtual environment | ||
.env | ||
.venv/ | ||
venv/ | ||
|
||
# PyCharm | ||
.idea | ||
|
||
# Python mode for VIM | ||
.ropeproject | ||
**/.ropeproject | ||
|
||
# Vim swap files | ||
**/*.swp | ||
|
||
# VS Code | ||
.vscode/ |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This is an Extension: https://github.com/compose-spec/compose-spec/blob/main/spec.md#extension | ||
x-environment: &env | ||
environment: | ||
DBNAME: development | ||
DBUSER: development | ||
DBPASS: development | ||
DBHOST: postgres | ||
CACHELOCATION: redis://redis:6379/0 | ||
BROKERLOCATION: redis://redis:6379/1 | ||
SECRET_KEY: django-insecure-ys)is-uls_$yaa(f%iyy^^7pe4a@ql)3thr9loszz#!8l4m4fk | ||
|
||
services: | ||
django: | ||
build: | ||
context: . | ||
dockerfile: ./docker/web/Dockerfile | ||
entrypoint: ./docker/web/docker-entrypoint.sh | ||
volumes: | ||
- ./:/app # Mount the current directory to /app within the container | ||
ports: | ||
- "8000:8000" | ||
depends_on: | ||
- redis | ||
- postgres | ||
<<: *env # This is a YAML merge | ||
|
||
celery: | ||
build: | ||
context: . | ||
dockerfile: ./docker/celery/Dockerfile | ||
volumes: | ||
- ./:/app | ||
depends_on: | ||
- django # Migrations need to be run before celery can start because of django-celery-results | ||
<<: *env | ||
|
||
redis: | ||
image: redis:alpine | ||
|
||
postgres: | ||
image: postgres:alpine | ||
volumes: | ||
- db-vol:/var/lib/postgresql/data | ||
environment: | ||
- POSTGRES_PASSWORD=development | ||
- POSTGRES_USER=development | ||
- POSTGRES_DB=development | ||
|
||
volumes: | ||
db-vol: |
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,6 @@ | ||
FROM python:alpine | ||
WORKDIR /app | ||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt | ||
COPY . . | ||
CMD celery -A attendence_tracker worker -l info |
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,8 @@ | ||
FROM python:alpine | ||
WORKDIR /app | ||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt | ||
COPY . . | ||
CMD python manage.py runserver 0.0.0.0:8000 | ||
EXPOSE 3000 | ||
ENTRYPOINT [ "./docker-entrypoint.sh" ] |
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,6 @@ | ||
#!/bin/sh | ||
echo "Running Migrations" | ||
python manage.py migrate | ||
|
||
echo "Starting Server" | ||
python manage.py runserver 0.0.0.0:8000 |
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