fix: images

This commit is contained in:
Bohdan Kucherivayi 2024-02-15 23:54:28 +02:00
parent ddf67f1a7f
commit 899d8fb37b
4 changed files with 31 additions and 98 deletions

View file

@ -9,9 +9,7 @@ x-depends-on-configurator: &depends_on_configurator
x-backend-defaults: &backend_defaults
<<: [*depends_on_configurator, *customizable_image]
volumes:
- ./data/sites:/home/zapal/frappe-bench/sites
- ./data/sites-assets:/home/zapal/frappe-bench/sites/assets
- ./data/logs:/home/zapal/frappe-bench/logs
- erp-bench:/home/zapal/frappe-bench
services:
configurator:
@ -80,4 +78,4 @@ services:
command: bench schedule
volumes:
sites:
erp-bench:

View file

@ -9,21 +9,10 @@ services:
networks:
default: null
volumes:
- type: bind
source: ./data/sites
target: /home/zapal/frappe-bench/sites
bind:
create_host_path: true
- type: bind
source: ./data/sites-assets
target: /home/zapal/frappe-bench/sites/assets
bind:
create_host_path: true
- type: bind
source: ./data/logs
target: /home/zapal/frappe-bench/logs
bind:
create_host_path: true
- type: volume
source: erp-bench
target: /home/zapal/frappe-bench
volume: {}
configurator:
command:
- |
@ -51,21 +40,10 @@ services:
networks:
default: null
volumes:
- type: bind
source: ./data/sites
target: /home/zapal/frappe-bench/sites
bind:
create_host_path: true
- type: bind
source: ./data/sites-assets
target: /home/zapal/frappe-bench/sites/assets
bind:
create_host_path: true
- type: bind
source: ./data/logs
target: /home/zapal/frappe-bench/logs
bind:
create_host_path: true
- type: volume
source: erp-bench
target: /home/zapal/frappe-bench
volume: {}
db:
command:
- --character-set-server=utf8mb4
@ -112,7 +90,7 @@ services:
default: null
volumes:
- type: bind
source: ./data
source: /home/bohdan-kucheriavyi/Documents/Repositories/Zapal/erp/data
target: /home/zapal/frappe-bench
bind:
create_host_path: true
@ -130,21 +108,10 @@ services:
networks:
default: null
volumes:
- type: bind
source: ./data/sites
target: /home/zapal/frappe-bench/sites
bind:
create_host_path: true
- type: bind
source: ./data/sites-assets
target: /home/zapal/frappe-bench/sites/assets
bind:
create_host_path: true
- type: bind
source: ./data/logs
target: /home/zapal/frappe-bench/logs
bind:
create_host_path: true
- type: volume
source: erp-bench
target: /home/zapal/frappe-bench
volume: {}
queue-short:
command:
- bench
@ -159,21 +126,10 @@ services:
networks:
default: null
volumes:
- type: bind
source: ./data/sites
target: /home/zapal/frappe-bench/sites
bind:
create_host_path: true
- type: bind
source: ./data/sites-assets
target: /home/zapal/frappe-bench/sites/assets
bind:
create_host_path: true
- type: bind
source: ./data/logs
target: /home/zapal/frappe-bench/logs
bind:
create_host_path: true
- type: volume
source: erp-bench
target: /home/zapal/frappe-bench
volume: {}
redis-cache:
image: redis:6.2-alpine
networks:
@ -204,21 +160,10 @@ services:
networks:
default: null
volumes:
- type: bind
source: ./data/sites
target: /home/zapal/frappe-bench/sites
bind:
create_host_path: true
- type: bind
source: ./data/sites-assets
target: /home/zapal/frappe-bench/sites/assets
bind:
create_host_path: true
- type: bind
source: ./data/logs
target: /home/zapal/frappe-bench/logs
bind:
create_host_path: true
- type: volume
source: erp-bench
target: /home/zapal/frappe-bench
volume: {}
websocket:
command:
- node
@ -232,7 +177,7 @@ services:
default: null
volumes:
- type: bind
source: ./data
source: /home/bohdan-kucheriavyi/Documents/Repositories/Zapal/erp/data
target: /home/zapal/frappe-bench
bind:
create_host_path: true
@ -242,6 +187,8 @@ networks:
volumes:
db-data:
name: erp_db-data
erp-bench:
name: erp_erp-bench
redis-cache-data:
name: erp_redis-cache-data
redis-queue-data:
@ -252,9 +199,7 @@ x-backend-defaults:
condition: service_completed_successfully
image: ghcr.io/zapal-tech/erp:latest
volumes:
- ./data/sites:/home/zapal/frappe-bench/sites
- ./data/sites-assets:/home/zapal/frappe-bench/sites/assets
- ./data/logs:/home/zapal/frappe-bench/logs
- erp-bench:/home/zapal/frappe-bench
x-customizable-image:
image: ghcr.io/zapal-tech/erp:latest
x-depends-on-configurator:

View file

@ -131,8 +131,7 @@ RUN bench get-app --branch=${HRMS_BRANCH} --resolve-deps hrms ${HRMS_REPO}
RUN echo "frappe\nhrms\nerpnext" > sites/apps.txt
RUN echo "{}" > sites/common_site_config.json
# DO NOT REMOVE .git FOLDERS
# RUN find apps -mindepth 1 -path "*/.git" | xargs git remote rm upstream
RUN find apps -mindepth 1 -path "*/.git" | xargs rm -fr
FROM base as erp
@ -144,11 +143,7 @@ COPY /usr/local/bin/nginx-entrypoint.sh /usr/local/bin/nginx-entrypoint.sh
WORKDIR /home/zapal/frappe-bench
VOLUME [ \
"/home/zapal/frappe-bench/sites", \
"/home/zapal/frappe-bench/sites/assets", \
"/home/zapal/frappe-bench/logs" \
]
VOLUME ["/home/zapal/frappe-bench"]
CMD [ \
"/home/zapal/frappe-bench/env/bin/gunicorn", \

View file

@ -125,8 +125,7 @@ RUN bench get-app --branch=${HRMS_BRANCH} --resolve-deps hrms ${HRMS_REPO}
RUN echo "frappe\nhrms\nerpnext" > sites/apps.txt
RUN echo "{}" > sites/common_site_config.json
# DO NOT REMOVE .git FOLDERS
# RUN find apps -mindepth 1 -path "*/.git" | xargs git remote rm upstream
RUN find apps -mindepth 1 -path "*/.git" | xargs rm -fr
FROM base as erp
@ -136,11 +135,7 @@ COPY --from=builder --chown=zapal:zapal /home/zapal/frappe-bench /home/zapal/fra
WORKDIR /home/zapal/frappe-bench
VOLUME [ \
"/home/zapal/frappe-bench/sites", \
"/home/zapal/frappe-bench/sites/assets", \
"/home/zapal/frappe-bench/logs" \
]
VOLUME ["/home/zapal/frappe-bench"]
CMD [ \
"/home/zapal/frappe-bench/env/bin/gunicorn", \