Merge pull request #13 from zapal-tech/main

fix: images
This commit is contained in:
Bohdan Kucheriavyi 2024-02-15 23:55:56 +02:00 committed by GitHub
commit 4487dc1623
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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 x-backend-defaults: &backend_defaults
<<: [*depends_on_configurator, *customizable_image] <<: [*depends_on_configurator, *customizable_image]
volumes: volumes:
- ./data/sites:/home/zapal/frappe-bench/sites - erp-bench:/home/zapal/frappe-bench
- ./data/sites-assets:/home/zapal/frappe-bench/sites/assets
- ./data/logs:/home/zapal/frappe-bench/logs
services: services:
configurator: configurator:
@ -80,4 +78,4 @@ services:
command: bench schedule command: bench schedule
volumes: volumes:
sites: erp-bench:

View file

@ -9,21 +9,10 @@ services:
networks: networks:
default: null default: null
volumes: volumes:
- type: bind - type: volume
source: ./data/sites source: erp-bench
target: /home/zapal/frappe-bench/sites target: /home/zapal/frappe-bench
bind: volume: {}
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
configurator: configurator:
command: command:
- | - |
@ -51,21 +40,10 @@ services:
networks: networks:
default: null default: null
volumes: volumes:
- type: bind - type: volume
source: ./data/sites source: erp-bench
target: /home/zapal/frappe-bench/sites target: /home/zapal/frappe-bench
bind: volume: {}
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
db: db:
command: command:
- --character-set-server=utf8mb4 - --character-set-server=utf8mb4
@ -112,7 +90,7 @@ services:
default: null default: null
volumes: volumes:
- type: bind - type: bind
source: ./data source: /home/bohdan-kucheriavyi/Documents/Repositories/Zapal/erp/data
target: /home/zapal/frappe-bench target: /home/zapal/frappe-bench
bind: bind:
create_host_path: true create_host_path: true
@ -130,21 +108,10 @@ services:
networks: networks:
default: null default: null
volumes: volumes:
- type: bind - type: volume
source: ./data/sites source: erp-bench
target: /home/zapal/frappe-bench/sites target: /home/zapal/frappe-bench
bind: volume: {}
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
queue-short: queue-short:
command: command:
- bench - bench
@ -159,21 +126,10 @@ services:
networks: networks:
default: null default: null
volumes: volumes:
- type: bind - type: volume
source: ./data/sites source: erp-bench
target: /home/zapal/frappe-bench/sites target: /home/zapal/frappe-bench
bind: volume: {}
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
redis-cache: redis-cache:
image: redis:6.2-alpine image: redis:6.2-alpine
networks: networks:
@ -204,21 +160,10 @@ services:
networks: networks:
default: null default: null
volumes: volumes:
- type: bind - type: volume
source: ./data/sites source: erp-bench
target: /home/zapal/frappe-bench/sites target: /home/zapal/frappe-bench
bind: volume: {}
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
websocket: websocket:
command: command:
- node - node
@ -232,7 +177,7 @@ services:
default: null default: null
volumes: volumes:
- type: bind - type: bind
source: ./data source: /home/bohdan-kucheriavyi/Documents/Repositories/Zapal/erp/data
target: /home/zapal/frappe-bench target: /home/zapal/frappe-bench
bind: bind:
create_host_path: true create_host_path: true
@ -242,6 +187,8 @@ networks:
volumes: volumes:
db-data: db-data:
name: erp_db-data name: erp_db-data
erp-bench:
name: erp_erp-bench
redis-cache-data: redis-cache-data:
name: erp_redis-cache-data name: erp_redis-cache-data
redis-queue-data: redis-queue-data:
@ -252,9 +199,7 @@ x-backend-defaults:
condition: service_completed_successfully condition: service_completed_successfully
image: ghcr.io/zapal-tech/erp:latest image: ghcr.io/zapal-tech/erp:latest
volumes: volumes:
- ./data/sites:/home/zapal/frappe-bench/sites - erp-bench:/home/zapal/frappe-bench
- ./data/sites-assets:/home/zapal/frappe-bench/sites/assets
- ./data/logs:/home/zapal/frappe-bench/logs
x-customizable-image: x-customizable-image:
image: ghcr.io/zapal-tech/erp:latest image: ghcr.io/zapal-tech/erp:latest
x-depends-on-configurator: 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 "frappe\nhrms\nerpnext" > sites/apps.txt
RUN echo "{}" > sites/common_site_config.json RUN echo "{}" > sites/common_site_config.json
# DO NOT REMOVE .git FOLDERS RUN find apps -mindepth 1 -path "*/.git" | xargs rm -fr
# RUN find apps -mindepth 1 -path "*/.git" | xargs git remote rm upstream
FROM base as erp 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 WORKDIR /home/zapal/frappe-bench
VOLUME [ \ VOLUME ["/home/zapal/frappe-bench"]
"/home/zapal/frappe-bench/sites", \
"/home/zapal/frappe-bench/sites/assets", \
"/home/zapal/frappe-bench/logs" \
]
CMD [ \ CMD [ \
"/home/zapal/frappe-bench/env/bin/gunicorn", \ "/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 "frappe\nhrms\nerpnext" > sites/apps.txt
RUN echo "{}" > sites/common_site_config.json RUN echo "{}" > sites/common_site_config.json
# DO NOT REMOVE .git FOLDERS RUN find apps -mindepth 1 -path "*/.git" | xargs rm -fr
# RUN find apps -mindepth 1 -path "*/.git" | xargs git remote rm upstream
FROM base as erp 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 WORKDIR /home/zapal/frappe-bench
VOLUME [ \ VOLUME ["/home/zapal/frappe-bench"]
"/home/zapal/frappe-bench/sites", \
"/home/zapal/frappe-bench/sites/assets", \
"/home/zapal/frappe-bench/logs" \
]
CMD [ \ CMD [ \
"/home/zapal/frappe-bench/env/bin/gunicorn", \ "/home/zapal/frappe-bench/env/bin/gunicorn", \