refactor(frappe-docker): code cleanup and fixes (#63)
* testing replacement for dbench * fixed perm issue and added docker control * fixes and tests fixed travis test, and perm issue * auto add permissions * bench setup anything-else should work now * removed adding site names to host (its pointless) * moved redis configuration folder into conf/ * added a docker down feature to dbench and changed some of the docs * hopefully should fix the args issue * Condensed Dockerfile Updated to latest node, and uses python-pip, also condensed a lot the Dockerfile. * Removed extra line * Removed MAINTAINER in favor of LABEL * all installs are in one apt command * Switch bench to dbench, added -s feature of dbench to bench. updated Docker file with sudo and vim, and setup travis to run with said changes * dockerfile: clean up (#52) * Condensed Dockerfile Updated to latest node, and uses python-pip, also condensed a lot the Dockerfile. * fixed travis, and cleaned up dbench a little * Oops... * oops, but only for travis, this runs fine * Travis! * added help to dbench, and updated readme * changes some of the wording of the help message * dbench: fix init issues (#55) ./dbench init would lead to 'missing argument: PATH' issue (#54), and could not find Procfile_docker and site-config. Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com> * bench setup anything-else should work now * Clean cache to get a smaller image (#57) Please include this commit to decrease the size of the docker image, the "rm -rf /var/lib/apt/lists/*" it is not usefull if it is not used in the same stage of the apt-get install RUN, similar with pip cache. References: - https://linux.die.net/man/8/apt-get - https://stackoverflow.com/questions/9510474/removing-pips-cache - https://semaphoreci.com/blog/2016/12/13/lightweight-docker-images-in-5-steps.html By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; (b) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com> * removed adding site names to host (its pointless) * moved redis configuration folder into conf/ * added a docker down feature to dbench and changed some of the docs * Changed the readme significantly Please enter the commit message for your changes. Lines starting * changed test.py to avoid naming errors * moving some things around for less lines * some more slight name changes * added a .gitignore * added the frappe folder again * added a .dockerignore and fixed the dockerfile up a bit * Updating travis' docker and compose This is the commit message #3: * bringing chown in dbench back * some refractoring * implementing codacy sugestions * moving some things around * Updating dbench in some areas * some random changes and fixes * dockerfile refactoring * Refractoring, reducing layers * removing the py script that took too many lines to do one simple thing * Fixed up the readme * some refractoring * moving to debian slim and refractoring * adding some logging * Updated travis to ubuntu xenial, should fix the curl issue * manually building curl, cause we cant use the latest version... * maybe we dont need it * changing the url to curl * trying this instead * lets just let it pollute the stream * please pollute!
This commit is contained in:
@@ -1,22 +1,26 @@
|
||||
version: '2'
|
||||
version: '3.7'
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb
|
||||
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=123
|
||||
- MYSQL_USER=root
|
||||
|
||||
volumes:
|
||||
- ./conf/mariadb-conf.d:/etc/mysql/conf.d
|
||||
- /var/lib/mysql
|
||||
|
||||
ports:
|
||||
- "3307:3306" #mariadb-port
|
||||
- "3307:3306" # MariaDB Port
|
||||
|
||||
container_name: mariadb
|
||||
|
||||
redis-cache:
|
||||
image: redis:alpine
|
||||
|
||||
volumes:
|
||||
- ./redis-conf:/etc/conf.d
|
||||
- ./conf/redis-conf.d:/etc/conf.d
|
||||
|
||||
command: ["redis-server","/etc/conf.d/redis_cache.conf"]
|
||||
|
||||
@@ -25,8 +29,9 @@ services:
|
||||
redis-queue:
|
||||
image: redis:alpine
|
||||
|
||||
|
||||
volumes:
|
||||
- ./redis-conf:/etc/conf.d
|
||||
- ./conf/redis-conf.d:/etc/conf.d
|
||||
|
||||
command: ["redis-server","/etc/conf.d/redis_queue.conf"]
|
||||
|
||||
@@ -36,7 +41,7 @@ services:
|
||||
image: redis:alpine
|
||||
|
||||
volumes:
|
||||
- ./redis-conf:/etc/conf.d
|
||||
- ./conf/redis-conf.d:/etc/conf.d
|
||||
|
||||
command: ["redis-server","/etc/conf.d/redis_socketio.conf"]
|
||||
|
||||
@@ -44,26 +49,32 @@ services:
|
||||
|
||||
|
||||
frappe:
|
||||
build: .
|
||||
|
||||
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: .
|
||||
- ./conf/redis-conf.d/redis_cache.conf:/home/frappe/frappe-bench/config/redis_cache.conf
|
||||
- ./conf/redis-conf.d/redis_queue.conf:/home/frappe/frappe-bench/config/redis_queue.conf
|
||||
- ./conf/redis-conf.d/redis_socketio.conf:/home/frappe/frappe-bench/config/redis_socketio.conf
|
||||
|
||||
ports:
|
||||
- "8000:8000" #webserver_port
|
||||
- "9000:9000" #socketio_port
|
||||
- "6787:6787" #file_watcher_port
|
||||
- "8000:8000" # Webserver Port
|
||||
- "9000:9000" # Socketio Port
|
||||
- "6787:6787" # File Watcher Port
|
||||
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
links:
|
||||
- redis-cache
|
||||
- redis-queue
|
||||
- redis-socketio
|
||||
- mariadb
|
||||
|
||||
depends_on:
|
||||
- mariadb
|
||||
- redis-cache
|
||||
- redis-queue
|
||||
- redis-socketio
|
||||
|
||||
container_name: frappe
|
||||
|
||||
Reference in New Issue
Block a user