Fix Docker and comment out Redis
This commit is contained in:
parent
24527147b3
commit
939a67444f
|
@ -1,8 +1,9 @@
|
|||
import stripe
|
||||
from django.conf import settings
|
||||
from redis import StrictRedis
|
||||
|
||||
r = StrictRedis(unix_socket_path="/var/run/redis/redis.sock", db=0)
|
||||
# from redis import StrictRedis
|
||||
|
||||
# r = StrictRedis(unix_socket_path="/var/run/redis/redis.sock", db=0)
|
||||
|
||||
if settings.STRIPE_TEST:
|
||||
stripe.api_key = settings.STRIPE_API_KEY_TEST
|
||||
|
|
|
@ -12,11 +12,11 @@ services:
|
|||
- "${APP_PORT}:8000"
|
||||
env_file:
|
||||
- .env
|
||||
volumes_from:
|
||||
- tmp
|
||||
# volumes_from:
|
||||
# - tmp
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
# redis:
|
||||
# condition: service_healthy
|
||||
migration:
|
||||
condition: service_started
|
||||
|
||||
|
@ -27,41 +27,41 @@ services:
|
|||
- ${PORTAINER_GIT_DIR}:/code
|
||||
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
|
||||
- ${APP_DATABASE_FILE}:/code/db.sqlite3
|
||||
volumes_from:
|
||||
- tmp
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
# volumes_from:
|
||||
# - tmp
|
||||
# depends_on:
|
||||
# redis:
|
||||
# condition: service_healthy
|
||||
|
||||
# pyroscope:
|
||||
# image: pyroscope/pyroscope
|
||||
# environment:
|
||||
# - PYROSCOPE_LOG_LEVEL=debug
|
||||
# ports:
|
||||
# - '4040:4040'
|
||||
# command:
|
||||
# - 'server'
|
||||
# tmp:
|
||||
# image: busybox
|
||||
# command: chmod -R 777 /var/run/redis
|
||||
# volumes:
|
||||
# - /var/run/redis
|
||||
|
||||
tmp:
|
||||
image: busybox
|
||||
command: chmod -R 777 /var/run/redis
|
||||
volumes:
|
||||
- /var/run/redis
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
command: redis-server /etc/redis.conf
|
||||
volumes:
|
||||
- ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf
|
||||
volumes_from:
|
||||
- tmp
|
||||
healthcheck:
|
||||
test: "redis-cli -s /var/run/redis/redis.sock ping"
|
||||
interval: 2s
|
||||
timeout: 2s
|
||||
retries: 15
|
||||
# redis:
|
||||
# image: redis
|
||||
# command: redis-server /etc/redis.conf
|
||||
# ulimits:
|
||||
# nproc: 65535
|
||||
# nofile:
|
||||
# soft: 65535
|
||||
# hard: 65535
|
||||
# volumes:
|
||||
# - ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf
|
||||
# - redis_data:/data
|
||||
# volumes_from:
|
||||
# - tmp
|
||||
# healthcheck:
|
||||
# test: "redis-cli -s /var/run/redis/redis.sock ping"
|
||||
# interval: 2s
|
||||
# timeout: 2s
|
||||
# retries: 15
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: xf
|
||||
name: xf
|
||||
|
||||
# volumes:
|
||||
# redis_data: {}
|
|
@ -1,4 +1,4 @@
|
|||
version: "2"
|
||||
version: "2.2"
|
||||
|
||||
services:
|
||||
app:
|
||||
|
@ -13,11 +13,11 @@ services:
|
|||
- "${APP_PORT}:8000" # uwsgi socket
|
||||
env_file:
|
||||
- ../stack.env
|
||||
volumes_from:
|
||||
- tmp
|
||||
# volumes_from:
|
||||
# - tmp
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
# redis:
|
||||
# condition: service_healthy
|
||||
migration:
|
||||
condition: service_started
|
||||
|
||||
|
@ -29,32 +29,41 @@ services:
|
|||
- ${PORTAINER_GIT_DIR}:/code
|
||||
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
|
||||
- ${APP_DATABASE_FILE}:/code/db.sqlite3
|
||||
volumes_from:
|
||||
- tmp
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
# volumes_from:
|
||||
# - tmp
|
||||
# depends_on:
|
||||
# redis:
|
||||
# condition: service_healthy
|
||||
|
||||
tmp:
|
||||
image: busybox
|
||||
command: chmod -R 777 /var/run/redis
|
||||
volumes:
|
||||
- /var/run/redis
|
||||
# tmp:
|
||||
# image: busybox
|
||||
# command: chmod -R 777 /var/run/redis
|
||||
# volumes:
|
||||
# - /var/run/redis
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
command: redis-server /etc/redis.conf
|
||||
volumes:
|
||||
- ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf
|
||||
volumes_from:
|
||||
- tmp
|
||||
healthcheck:
|
||||
test: "redis-cli -s /var/run/redis/redis.sock ping"
|
||||
interval: 2s
|
||||
timeout: 2s
|
||||
retries: 15
|
||||
# redis:
|
||||
# image: redis
|
||||
# command: redis-server /etc/redis.conf
|
||||
# ulimits:
|
||||
# nproc: 65535
|
||||
# nofile:
|
||||
# soft: 65535
|
||||
# hard: 65535
|
||||
# volumes:
|
||||
# - ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf
|
||||
# - redis_data:/data
|
||||
# volumes_from:
|
||||
# - tmp
|
||||
# healthcheck:
|
||||
# test: "redis-cli -s /var/run/redis/redis.sock ping"
|
||||
# interval: 2s
|
||||
# timeout: 2s
|
||||
# retries: 15
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: xf
|
||||
name: xf
|
||||
|
||||
# volumes:
|
||||
# redis_data: {}
|
||||
|
|
Loading…
Reference in New Issue