-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #622 from thorrak/dev
Docker Support
- Loading branch information
Showing
101 changed files
with
3,985 additions
and
1,305 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,6 @@ | ||
.* | ||
!.gitignore | ||
!.git | ||
!.coveragerc | ||
!.env | ||
!.pylintrc |
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,9 @@ | ||
# General | ||
# ------------------------------------------------------------------------------ | ||
USE_DOCKER=True | ||
IPYTHONDIR=/app/.ipython | ||
# Redis | ||
# ------------------------------------------------------------------------------ | ||
REDIS_URL=redis://redis:6379/0 | ||
|
||
|
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,7 @@ | ||
# PostgreSQL | ||
# ------------------------------------------------------------------------------ | ||
POSTGRES_HOST=postgres | ||
POSTGRES_PORT=5432 | ||
POSTGRES_DB=fermentrack | ||
POSTGRES_USER=postgres_user | ||
POSTGRES_PASSWORD=postgres_password |
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,44 @@ | ||
# General | ||
# ------------------------------------------------------------------------------ | ||
# DJANGO_READ_DOT_ENV_FILE=True | ||
DJANGO_SETTINGS_MODULE=fermentrack_django.settings | ||
DJANGO_SECRET_KEY={secret_key} | ||
DJANGO_ADMIN_URL={admin_url}/ | ||
DJANGO_ALLOWED_HOSTS=* | ||
USE_DOCKER=True | ||
|
||
# Security | ||
# ------------------------------------------------------------------------------ | ||
# TIP: better off using DNS, however, redirect is OK too | ||
DJANGO_SECURE_SSL_REDIRECT=False | ||
|
||
# ------------------------------------------------------------------------------ | ||
DJANGO_SERVER_EMAIL= | ||
|
||
MAILGUN_API_KEY= | ||
MAILGUN_DOMAIN= | ||
|
||
|
||
# django-allauth | ||
# ------------------------------------------------------------------------------ | ||
DJANGO_ACCOUNT_ALLOW_REGISTRATION=True | ||
|
||
# Gunicorn | ||
# ------------------------------------------------------------------------------ | ||
WEB_CONCURRENCY=4 | ||
|
||
# Sentry | ||
# ------------------------------------------------------------------------------ | ||
SENTRY_DSN= | ||
|
||
|
||
# Redis | ||
# ------------------------------------------------------------------------------ | ||
#REDIS_URL=redis://redis:6379/0 | ||
REDIS_URL=redis://127.0.0.1:6379/0 | ||
|
||
|
||
# Version Management | ||
# ------------------------------------------------------------------------------ | ||
ENV_DJANGO_VERSION=1 |
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 @@ | ||
# PostgreSQL | ||
# ------------------------------------------------------------------------------ | ||
POSTGRES_HOST=127.0.0.1 | ||
POSTGRES_PORT=5432 | ||
POSTGRES_DB=fermentrack | ||
POSTGRES_USER={postgres_user} | ||
POSTGRES_PASSWORD={postgres_password} | ||
|
||
# Version Management | ||
# ------------------------------------------------------------------------------ | ||
ENV_POSTGRES_VERSION=1 |
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,41 @@ | ||
name: 'Build & Push to Docker Hub' | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- master | ||
|
||
jobs: | ||
buildx: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: all | ||
- | ||
name: Dockerhub login | ||
env: | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
run: | | ||
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin | ||
- | ||
name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
with: | ||
version: latest | ||
- | ||
name: Build dockerfile (armv7/amd64/arm64) | ||
run: | | ||
docker buildx build \ | ||
--platform=linux/arm/v7,linux/amd64 \ | ||
--output "type=image,push=true" \ | ||
--file ./compose/production/django/Dockerfile . \ | ||
--tag jdbeeler/fermentrack:latest |
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 |
---|---|---|
|
@@ -179,6 +179,9 @@ config.ini | |
*.bin | ||
*.hex | ||
|
||
.envs/ | ||
!.envs/.local/ | ||
!.envs/.prod-sample/ | ||
|
||
#ignore generated files | ||
collected_static/* |
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
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
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
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
Oops, something went wrong.