Fix Docker and comment out Redis

master
Mark Veidemanis 2 years ago
parent 24527147b3
commit 939a67444f
Signed by: m
GPG Key ID: 5ACFCEED46C0904F

@ -1,8 +1,9 @@
import stripe import stripe
from django.conf import settings 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: if settings.STRIPE_TEST:
stripe.api_key = settings.STRIPE_API_KEY_TEST stripe.api_key = settings.STRIPE_API_KEY_TEST

@ -12,11 +12,11 @@ services:
- "${APP_PORT}:8000" - "${APP_PORT}:8000"
env_file: env_file:
- .env - .env
volumes_from: # volumes_from:
- tmp # - tmp
depends_on: depends_on:
redis: # redis:
condition: service_healthy # condition: service_healthy
migration: migration:
condition: service_started condition: service_started
@ -27,41 +27,41 @@ services:
- ${PORTAINER_GIT_DIR}:/code - ${PORTAINER_GIT_DIR}:/code
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py - ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
- ${APP_DATABASE_FILE}:/code/db.sqlite3 - ${APP_DATABASE_FILE}:/code/db.sqlite3
volumes_from: # volumes_from:
- tmp # - tmp
depends_on: # depends_on:
redis: # redis:
condition: service_healthy # condition: service_healthy
# pyroscope: # tmp:
# image: pyroscope/pyroscope # image: busybox
# environment: # command: chmod -R 777 /var/run/redis
# - PYROSCOPE_LOG_LEVEL=debug # volumes:
# ports: # - /var/run/redis
# - '4040:4040'
# command:
# - 'server'
tmp: # redis:
image: busybox # image: redis
command: chmod -R 777 /var/run/redis # command: redis-server /etc/redis.conf
volumes: # ulimits:
- /var/run/redis # nproc: 65535
# nofile:
redis: # soft: 65535
image: redis # hard: 65535
command: redis-server /etc/redis.conf # volumes:
volumes: # - ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf
- ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf # - redis_data:/data
volumes_from: # volumes_from:
- tmp # - tmp
healthcheck: # healthcheck:
test: "redis-cli -s /var/run/redis/redis.sock ping" # test: "redis-cli -s /var/run/redis/redis.sock ping"
interval: 2s # interval: 2s
timeout: 2s # timeout: 2s
retries: 15 # retries: 15
networks: networks:
default: default:
external: external:
name: xf name: xf
# volumes:
# redis_data: {}

@ -1,4 +1,4 @@
version: "2" version: "2.2"
services: services:
app: app:
@ -13,11 +13,11 @@ services:
- "${APP_PORT}:8000" # uwsgi socket - "${APP_PORT}:8000" # uwsgi socket
env_file: env_file:
- ../stack.env - ../stack.env
volumes_from: # volumes_from:
- tmp # - tmp
depends_on: depends_on:
redis: # redis:
condition: service_healthy # condition: service_healthy
migration: migration:
condition: service_started condition: service_started
@ -29,32 +29,41 @@ services:
- ${PORTAINER_GIT_DIR}:/code - ${PORTAINER_GIT_DIR}:/code
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py - ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
- ${APP_DATABASE_FILE}:/code/db.sqlite3 - ${APP_DATABASE_FILE}:/code/db.sqlite3
volumes_from: # volumes_from:
- tmp # - tmp
depends_on: # depends_on:
redis: # redis:
condition: service_healthy # condition: service_healthy
tmp: # tmp:
image: busybox # image: busybox
command: chmod -R 777 /var/run/redis # command: chmod -R 777 /var/run/redis
volumes: # volumes:
- /var/run/redis # - /var/run/redis
redis: # redis:
image: redis # image: redis
command: redis-server /etc/redis.conf # command: redis-server /etc/redis.conf
volumes: # ulimits:
- ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf # nproc: 65535
volumes_from: # nofile:
- tmp # soft: 65535
healthcheck: # hard: 65535
test: "redis-cli -s /var/run/redis/redis.sock ping" # volumes:
interval: 2s # - ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf
timeout: 2s # - redis_data:/data
retries: 15 # volumes_from:
# - tmp
# healthcheck:
# test: "redis-cli -s /var/run/redis/redis.sock ping"
# interval: 2s
# timeout: 2s
# retries: 15
networks: networks:
default: default:
external: external:
name: xf name: xf
# volumes:
# redis_data: {}

Loading…
Cancel
Save