From 62f1129b3f19f5f4acb124fcf63885c03859cdf2 Mon Sep 17 00:00:00 2001 From: Chinmay Pai Date: Fri, 28 Sep 2018 13:30:13 +0530 Subject: [PATCH] redis: fix redis Signed-off-by: Chinmay Pai --- Dockerfile | 2 +- dbench | 4 ++-- docker-compose.yml | 21 +++------------------ 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7f5b9a14..0d9bd63e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ USER root RUN apt-get update RUN apt-get install -y iputils-ping RUN apt-get install -y git build-essential python-setuptools python-dev libffi-dev libssl-dev -RUN apt-get install -y redis-tools software-properties-common libxrender1 libxext6 xfonts-75dpi xfonts-base +RUN apt-get install -y redis-tools redis-server software-properties-common libxrender1 libxext6 xfonts-75dpi xfonts-base RUN apt-get install -y libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev python-tk apt-transport-https libsasl2-dev libldap2-dev libtiff5-dev tcl8.6-dev tk8.6-dev RUN apt-get install -y wget RUN wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py diff --git a/dbench b/dbench index 8731cf97..fe835bf5 100755 --- a/dbench +++ b/dbench @@ -16,10 +16,10 @@ if [[ $# -eq 0 ]]; then elif [ $1 == 'init' ] then - docker exec -i -u root frappe bash -c "cd /home/frappe && chown -R frappe:frappe ./*" + docker exec -i -u root frappe bash -c "cd /home/frappe && chown -R frappe:frappe ./*" docker exec -it frappe bash -c "cd .. && bench init frappe-bench --ignore-exist --skip-redis-config-generation && cd frappe-bench" docker exec -it frappe bash -c "mv Procfile_docker Procfile && mv sites/common_site_config_docker.json sites/common_site_config.json" - docker exec -it -u root frappe bash -c "apt-get install vim && apt-get install sudo && usermod -aG sudo frappe && printf '# User rules for frappe\nfrappe ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/frappe" + docker exec -it -u root frappe bash -c "apt-get install -y vim sudo && usermod -aG sudo frappe && printf '# User rules for frappe\nfrappe ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/frappe" docker exec -it frappe bash -c "bench set-mariadb-host mariadb" docker exec -it frappe bash -c "bench new-site site1.local" docker exec -it frappe bash -c "bench get-app erpnext" diff --git a/docker-compose.yml b/docker-compose.yml index a8beba0b..42f686f8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,37 +13,22 @@ services: redis-cache: image: redis:alpine - - volumes: - - ./redis-conf/redis_cache.conf:/etc/conf.d/redis.conf - - command: ["redis-server","/etc/conf.d/redis.conf"] - container_name: redis-cache redis-queue: image: redis:alpine - - volumes: - - ./redis-conf/redis_queue.conf:/etc/conf.d/redis.conf - - command: ["redis-server","/etc/conf.d/redis.conf"] - container_name: redis-queue redis-socketio: image: redis:alpine - - volumes: - - ./redis-conf/redis_socketio.conf:/etc/conf.d/redis.conf - - command: ["redis-server","/etc/conf.d/redis.conf"] - container_name: redis-socketio frappe: volumes: - ./frappe-bench:/home/frappe/frappe-bench + - ./redis-conf/redis_cache.conf:/home/frappe/frappe-bench/config/redis_cache.conf + - ./redis-conf/redis_queue.conf:/home/frappe/frappe-bench/config/redis_queue.conf + - ./redis-conf/redis_socketio.conf:/home/frappe/frappe-bench/config/redis_socketio.conf build: . ports: - "8000:8000" #webserver_port