2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-09 23:00:56 +00:00

Merge pull request #292 from revant/fix-bench-image

fix: bench image
This commit is contained in:
Revant Nandgaonkar 2020-07-01 04:28:48 +05:30 committed by GitHub
commit cf0dd228ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 64 additions and 37 deletions

View File

@ -85,8 +85,8 @@ RUN bash -c "bench --version"
# https://nodejs.org/download/release/latest-v10.x/
# https://nodejs.org/download/release/latest-v12.x/
# https://nodejs.org/download/release/latest-v13.x/
ENV NODE_VERSION=12
ENV NODE_VERSION_FRAPPEV11=10
ENV NODE_VERSION=12.18.2
ENV NODE_VERSION_FRAPPEV11=10.21.0
# Install nvm with node
RUN wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh
@ -103,9 +103,6 @@ RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} && npm install -g yarn
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
ENV PATH="/home/frappe/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
# Install yarn
RUN npm install -g yarn
# Print version and verify bashrc is properly sourced so that everything works in the Dockerfile
RUN node --version \
&& npm --version \

View File

@ -3,16 +3,21 @@ version: "3"
services:
traefik:
image: "traefik:v2.2"
command:
- "--log.level=DEBUG"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
labels:
# enable traefik
- "traefik.enable=true"
ports:
- "80:80"
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
command:
- "--log.level=DEBUG"
- "--providers.docker"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--providers.docker.swarmmode"
- "--accesslog"
- "--log"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
@ -24,6 +29,9 @@ services:
- FRAPPE_PY_PORT=8000
- FRAPPE_SOCKETIO=frappe-socketio
- SOCKETIO_PORT=9000
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.routers.erpnext-nginx.rule=HostRegexp(`{catchall:.*}`)"
@ -37,7 +45,9 @@ services:
erpnext-python:
image: frappe/erpnext-worker:edge
restart: on-failure
deploy:
restart_policy:
condition: on-failure
environment:
- MARIADB_HOST=mariadb
- REDIS_CACHE=redis-cache:6379
@ -51,15 +61,17 @@ services:
frappe-socketio:
image: frappe/frappe-socketio:edge
restart: on-failure
depends_on:
- redis-socketio
deploy:
restart_policy:
condition: on-failure
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
erpnext-worker-default:
image: frappe/erpnext-worker:edge
restart: on-failure
deploy:
restart_policy:
condition: on-failure
command: worker
depends_on:
- redis-queue
@ -69,7 +81,9 @@ services:
erpnext-worker-short:
image: frappe/erpnext-worker:edge
restart: on-failure
deploy:
restart_policy:
condition: on-failure
command: worker
environment:
- WORKER_TYPE=short
@ -81,7 +95,9 @@ services:
erpnext-worker-long:
image: frappe/erpnext-worker:edge
restart: on-failure
deploy:
restart_policy:
condition: on-failure
command: worker
environment:
- WORKER_TYPE=long
@ -93,7 +109,9 @@ services:
erpnext-schedule:
image: frappe/erpnext-worker:edge
restart: on-failure
deploy:
restart_policy:
condition: on-failure
command: schedule
depends_on:
- redis-queue
@ -103,30 +121,42 @@ services:
redis-cache:
image: redis:latest
restart: on-failure
deploy:
restart_policy:
condition: on-failure
volumes:
- redis-cache-vol:/data
redis-queue:
image: redis:latest
restart: on-failure
deploy:
restart_policy:
condition: on-failure
volumes:
- redis-queue-vol:/data
redis-socketio:
image: redis:latest
restart: on-failure
deploy:
restart_policy:
condition: on-failure
volumes:
- redis-socketio-vol:/data
site-configurator:
image: frappe/erpnext-worker:edge
deploy:
restart_policy:
condition: none
command: ["bash", "-c", "echo mysite.localhost > /sites/currentsite.txt"]
volumes:
- sites-vol:/sites:rw
mariadb-configurator:
image: mariadb:10.3
deploy:
restart_policy:
condition: none
command:
- "bash"
- "-c"
@ -147,9 +177,9 @@ services:
mariadb:
image: mariadb:10.3
restart: on-failure
depends_on:
- mariadb-configurator
deploy:
restart_policy:
condition: on-failure
environment:
- MYSQL_ROOT_PASSWORD=admin
volumes:
@ -158,10 +188,10 @@ services:
site-creator:
image: frappe/erpnext-worker:edge
restart: "no"
deploy:
restart_policy:
condition: none
command: new
depends_on:
- erpnext-python
environment:
- SITE_NAME=mysite.localhost
- DB_ROOT_USER=root