cleanup: docker-compose and .env.example
This commit is contained in:
parent
1bbd28933f
commit
5bf31f26a1
|
@ -1,4 +1,4 @@
|
||||||
version: '3'
|
version: "3"
|
||||||
services:
|
services:
|
||||||
# Update this to the name of the service you want to work with in your docker-compose.yml file
|
# Update this to the name of the service you want to work with in your docker-compose.yml file
|
||||||
web:
|
web:
|
||||||
|
@ -30,11 +30,10 @@ services:
|
||||||
- SPEJSTORE_DB_PASSWORD=postgres
|
- SPEJSTORE_DB_PASSWORD=postgres
|
||||||
- SPEJSTORE_DB_HOST=db
|
- SPEJSTORE_DB_HOST=db
|
||||||
# - SPEJSTORE_DB_PORT=
|
# - SPEJSTORE_DB_PORT=
|
||||||
- SPEJSTORE_ALLOWED_HOSTS=localhost,127.0.0.1
|
- SPEJSTORE_ALLOWED_HOSTS=localhost,127.0.0.1,0.0.0.0
|
||||||
# - SPEJSTORE_CLIENT_ID=
|
# - SPEJSTORE_CLIENT_ID=
|
||||||
# - SPEJSTORE_SECRET=
|
# - SPEJSTORE_SECRET=
|
||||||
# - SPEJSTORE_MEDIA_ROOT=
|
# - SPEJSTORE_MEDIA_ROOT=
|
||||||
# - SPEJSTORE_REQUIRE_AUTH=true
|
# - SPEJSTORE_REQUIRE_AUTH=true
|
||||||
- SPEJSTORE_OAUTH_REDIRECT_IS_HTTPS=false
|
- SPEJSTORE_OAUTH_REDIRECT_IS_HTTPS=false
|
||||||
- SPEJSTORE_PROXY_TRUSTED_IPS=172.21.37.1
|
# - SPEJSTORE_PROXY_TRUSTED_IPS=172.21.37.1
|
||||||
|
|
||||||
|
|
11
.env.example
11
.env.example
|
@ -7,3 +7,14 @@ SPEJSTORE_DB_USER=postgres
|
||||||
SPEJSTORE_DB_HOST=db
|
SPEJSTORE_DB_HOST=db
|
||||||
SPEJSTORE_HOST="https://inventory.hackerspace.pl"
|
SPEJSTORE_HOST="https://inventory.hackerspace.pl"
|
||||||
SPEJSTORE_LABEL_API=https://label.waw.hackerspace.pl
|
SPEJSTORE_LABEL_API=https://label.waw.hackerspace.pl
|
||||||
|
|
||||||
|
|
||||||
|
# "filesystem" or "s3"
|
||||||
|
SPEJSTORE_FILE_STORAGE_TYPE="filesystem"
|
||||||
|
|
||||||
|
# S3 bucket
|
||||||
|
SPEJSTORE_S3_ACCESS_KEY="SPEJSTORE_S3_ACCESS_KEY"
|
||||||
|
SPEJSTORE_S3_SECRET_KEY="SPEJSTORE_S3_SECRET_KEY"
|
||||||
|
SPEJSTORE_S3_ENDPOINT_URL="SPEJSTORE_S3_ENDPOINT_URL"
|
||||||
|
SPEJSTORE_S3_BUCKET_NAME="SPEJSTORE_S3_BUCKET_NAME"
|
||||||
|
SPEJSTORE_S3_MEDIA_LOCATION="SPEJSTORE_S3_MEDIA_LOCATION"
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
version: "3"
|
|
||||||
services:
|
|
||||||
web:
|
|
||||||
environment:
|
|
||||||
- SPEJSTORE_ENV=dev
|
|
||||||
- SPEJSTORE_DB_NAME=postgres
|
|
||||||
- SPEJSTORE_DB_USER=postgres
|
|
||||||
- SPEJSTORE_DB_PASSWORD=postgres
|
|
||||||
- SPEJSTORE_DB_HOST=db
|
|
||||||
# - SPEJSTORE_DB_PORT=
|
|
||||||
- SPEJSTORE_ALLOWED_HOSTS=localhost,127.0.0.1
|
|
||||||
# - SPEJSTORE_CLIENT_ID=
|
|
||||||
# - SPEJSTORE_SECRET=
|
|
||||||
# - SPEJSTORE_MEDIA_ROOT=
|
|
||||||
# - SPEJSTORE_REQUIRE_AUTH=true
|
|
||||||
- SPEJSTORE_OAUTH_REDIRECT_IS_HTTPS=false
|
|
||||||
- SPEJSTORE_PROXY_TRUSTED_IPS=172.21.37.1
|
|
|
@ -1,8 +0,0 @@
|
||||||
version: "3"
|
|
||||||
|
|
||||||
services:
|
|
||||||
db:
|
|
||||||
volumes:
|
|
||||||
- /var/spejstore-data-new:/var/lib/postgresql/data
|
|
||||||
web:
|
|
||||||
build: .
|
|
|
@ -1,15 +1,3 @@
|
||||||
"""
|
|
||||||
Django settings for spejstore project.
|
|
||||||
|
|
||||||
Generated by 'django-admin startproject' using Django 1.10.1.
|
|
||||||
|
|
||||||
For more information on this file, see
|
|
||||||
https://docs.djangoproject.com/en/1.10/topics/settings/
|
|
||||||
|
|
||||||
For the full list of settings and their values, see
|
|
||||||
https://docs.djangoproject.com/en/1.10/ref/settings/
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
@ -171,6 +159,11 @@ SOCIAL_AUTH_PIPELINE = (
|
||||||
|
|
||||||
# Determines the storage type for Django static files and media.
|
# Determines the storage type for Django static files and media.
|
||||||
FILE_STORAGE_TYPE = env("FILE_STORAGE_TYPE", "filesystem")
|
FILE_STORAGE_TYPE = env("FILE_STORAGE_TYPE", "filesystem")
|
||||||
|
|
||||||
|
# Make sure we check for correct file storage type
|
||||||
|
if not (FILE_STORAGE_TYPE == "filesystem" or FILE_STORAGE_TYPE == "s3"):
|
||||||
|
raise Exception("SPEJSTORE_FILE_STORAGE_TYPE must be 'filesystem' or 's3' ")
|
||||||
|
|
||||||
if FILE_STORAGE_TYPE == "filesystem":
|
if FILE_STORAGE_TYPE == "filesystem":
|
||||||
STORAGES = {
|
STORAGES = {
|
||||||
"default": {
|
"default": {
|
||||||
|
|
Loading…
Reference in New Issue