mirror of
https://github.com/frappe/frappe_docker.git
synced 2025-02-10 07:58:52 +00:00
git diff bb01cc827732524ef9a2aa94036f0f8d9d6e78e2 a32c9230dd726399c59f5849d7e0a25b1e3a281a | git apply --reject --whitespace=fix
This commit is contained in:
parent
bb01cc8277
commit
950647a182
18
.travis.yml
Normal file
18
.travis.yml
Normal file
@ -0,0 +1,18 @@
|
||||
language: python
|
||||
python:
|
||||
- "2.7"
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
install:
|
||||
-docker-compose build
|
||||
-docker-compose up -d
|
||||
|
||||
script:
|
||||
-docker-compose ps | grep -i frappe
|
||||
-docker-compose ps | grep -i redis-cache
|
||||
-docker-compose ps | grep -i redis-queue
|
||||
-docker-compose ps | grep -i redis-socketio
|
||||
-docker-compose ps | grep -i mariadb
|
||||
# -python test.py
|
16
Dockerfile
16
Dockerfile
@ -16,7 +16,7 @@ RUN pip install --upgrade setuptools pip
|
||||
RUN useradd -ms /bin/bash frappe
|
||||
RUN apt-get install -y curl
|
||||
RUN apt-get install -y rlwrap
|
||||
RUN apt-get install redis-server
|
||||
RUN apt-get install redis-tools
|
||||
RUN apt-get install -y nano
|
||||
|
||||
|
||||
@ -29,14 +29,12 @@ RUN apt-get install -y wkhtmltopdf
|
||||
|
||||
USER frappe
|
||||
WORKDIR /home/frappe
|
||||
RUN git clone -b develop https://github.com/vishalseshagiri/bench.git bench-repo
|
||||
|
||||
USER root
|
||||
RUN cd /home/frappe
|
||||
RUN pip install -e bench-repo
|
||||
RUN apt-get install -y libmysqlclient-dev mariadb-client mariadb-common
|
||||
RUN chown -R frappe:frappe /home/frappe/*
|
||||
|
||||
#USER root
|
||||
#RUN pip install -e bench-repo
|
||||
#RUN apt-get install -y libmysqlclient-dev mariadb-client mariadb-common
|
||||
#RUN chown -R frappe:frappe /home/frappe
|
||||
|
||||
#USER frappe
|
||||
#RUN bench init frappe-bench && cd frappe-bench
|
||||
USER frappe
|
||||
WORKDIR /home/frappe/frappe-bench
|
||||
|
@ -1,7 +0,0 @@
|
||||
echo "Enter a password for your database "
|
||||
read DB_PASS
|
||||
|
||||
echo 'export DB_PASS='$DB_PASS >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
|
||||
docker-compose up -d
|
@ -3,19 +3,20 @@
|
||||
|
||||
[client]
|
||||
# Default is Latin1, if you need UTF-8 set this (also in server section)
|
||||
#default-character-set = utf8
|
||||
#default-character-set = utf8
|
||||
|
||||
[mysqld]
|
||||
#
|
||||
# * Character sets
|
||||
#
|
||||
#
|
||||
# Default is Latin1, if you need UTF-8 set all this (also in client section)
|
||||
#
|
||||
#character-set-server = utf8
|
||||
#collation-server = utf8_general_ci
|
||||
#character_set_server = utf8
|
||||
#collation_server = utf8_general_ci
|
||||
#character-set-server = utf8
|
||||
#collation-server = utf8_general_ci
|
||||
#character_set_server = utf8
|
||||
#collation_server = utf8_general_ci
|
||||
# Import all .cnf files from configuration directory
|
||||
bind-address = 0.0.0.0
|
||||
!includedir /etc/mysql/mariadb.conf.d/
|
||||
|
||||
|
||||
@ -29,5 +30,3 @@ collation-server = utf8mb4_unicode_ci
|
||||
|
||||
[mysql]
|
||||
default-character-set = utf8mb4
|
||||
|
||||
|
||||
|
27
dbench
Executable file
27
dbench
Executable file
@ -0,0 +1,27 @@
|
||||
usage="$(basename "$0") [-h] [-c "<command to be executed inside container>"]
|
||||
|
||||
where:
|
||||
-h show this help text
|
||||
-c execute a command inside docker using docker exec"
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
temp="docker exec -it frappe bash"
|
||||
$temp
|
||||
else
|
||||
while getopts ':hc:' option; do
|
||||
echo $option
|
||||
case "$option" in
|
||||
h) echo "$usage"
|
||||
exit
|
||||
;;
|
||||
c) seed=$OPTARG
|
||||
temp="docker exec frappe bash -c 'su frappe -c \"bench $OPTARG\"; exec \"${SHELL:-sh}\"'"
|
||||
exec="true"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [[ "$exec" == "true" ]]; then
|
||||
$temp
|
||||
fi
|
||||
shift $((OPTIND - 1))
|
||||
fi
|
@ -3,28 +3,62 @@ services:
|
||||
mariadb:
|
||||
image: "mariadb"
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=${DB_PASS}
|
||||
- MYSQL_ROOT_PASSWORD=123
|
||||
- MYSQL_USER=root
|
||||
volumes:
|
||||
- ./conf/mariadb-conf.d:/etc/mysql/conf.d
|
||||
ports:
|
||||
- "3306:3306"
|
||||
container_name: mariadb
|
||||
|
||||
redis:
|
||||
image: "redis:alpine"
|
||||
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:/home/frappe
|
||||
- ./frappe-bench:/home/frappe/frappe-bench
|
||||
build: .
|
||||
ports:
|
||||
- "8000:8000"
|
||||
- "8000:8000"
|
||||
stdin_open: true
|
||||
tty: true
|
||||
links:
|
||||
- redis
|
||||
- redis-cache
|
||||
- redis-queue
|
||||
- redis-socketio
|
||||
- mariadb
|
||||
depends_on:
|
||||
- mariadb
|
||||
- redis
|
||||
|
||||
- redis-cache
|
||||
- redis-queue
|
||||
- redis-socketio
|
||||
container_name: frappe
|
||||
|
||||
#TODO: bind ports of the redis and frappe containers
|
||||
|
@ -1,3 +0,0 @@
|
||||
app_id=`docker ps | grep docker_frappe | awk {'print $1'}`
|
||||
|
||||
docker exec -it $app_id bash -c 'su frappe; exec "${SHELL:-sh}"'
|
8
frappe-bench/Procfile_docker
Normal file
8
frappe-bench/Procfile_docker
Normal file
@ -0,0 +1,8 @@
|
||||
web: bench serve --port 8000
|
||||
|
||||
socketio: /usr/bin/node apps/frappe/socketio.js
|
||||
watch: bench watch
|
||||
schedule: bench schedule
|
||||
worker_short: bench worker --queue short
|
||||
worker_long: bench worker --queue long
|
||||
worker_default: bench worker --queue default
|
19
frappe-bench/sites/common_site_config_docker.json
Normal file
19
frappe-bench/sites/common_site_config_docker.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"auto_update": false,
|
||||
"background_workers": 1,
|
||||
"db_host": "mariadb",
|
||||
"file_watcher_port": 6787,
|
||||
"frappe_user": "frappe",
|
||||
"gunicorn_workers": 4,
|
||||
"rebase_on_pull": false,
|
||||
"redis_cache": "redis://redis-cache:13000",
|
||||
"redis_queue": "redis://redis-queue:11000",
|
||||
"redis_socketio": "redis://redis-socketio:12000",
|
||||
"restart_supervisor_on_update": false,
|
||||
"root_password": "123",
|
||||
"serve_default_site": true,
|
||||
"shallow_clone": true,
|
||||
"socketio_port": 9000,
|
||||
"update_bench_on_update": true,
|
||||
"webserver_port": 8000
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
#USER root
|
||||
cd /home/frappe
|
||||
git clone https://github.com/frappe/bench bench-repo
|
||||
pip install -e bench-repo
|
||||
apt-get install -y libmysqlclient-dev mariadb-client mariadb-common
|
||||
chown -R frappe:frappe /home/frappe
|
||||
|
||||
#USER frappe
|
||||
su frappe
|
1
redis-conf/pids/redis_cache.pid
Normal file
1
redis-conf/pids/redis_cache.pid
Normal file
@ -0,0 +1 @@
|
||||
20
|
1
redis-conf/pids/redis_queue.pid
Normal file
1
redis-conf/pids/redis_queue.pid
Normal file
@ -0,0 +1 @@
|
||||
24
|
1
redis-conf/pids/redis_socketio.pid
Normal file
1
redis-conf/pids/redis_socketio.pid
Normal file
@ -0,0 +1 @@
|
||||
29
|
8
redis-conf/redis_cache.conf
Normal file
8
redis-conf/redis_cache.conf
Normal file
@ -0,0 +1,8 @@
|
||||
dbfilename redis_cache.rdb
|
||||
bind 0.0.0.0
|
||||
port 13000
|
||||
maxmemory 292mb
|
||||
maxmemory-policy allkeys-lru
|
||||
appendonly no
|
||||
|
||||
save ""
|
3
redis-conf/redis_queue.conf
Normal file
3
redis-conf/redis_queue.conf
Normal file
@ -0,0 +1,3 @@
|
||||
dbfilename redis_queue.rdb
|
||||
bind 0.0.0.0
|
||||
port 11000
|
3
redis-conf/redis_socketio.conf
Normal file
3
redis-conf/redis_socketio.conf
Normal file
@ -0,0 +1,3 @@
|
||||
dbfilename redis_socketio.rdb
|
||||
bind 0.0.0.0
|
||||
port 12000
|
Loading…
x
Reference in New Issue
Block a user