2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-12-23 10:38:58 +00:00

ci: fix test and revert yamls

This commit is contained in:
Revant Nandgaonkar 2021-11-22 13:17:17 +05:30
parent d68bcdc8bd
commit 91648299ba
7 changed files with 14 additions and 53 deletions

View File

@ -163,15 +163,6 @@ services:
- sites-vol:/home/frappe/frappe-bench/sites:rw - sites-vol:/home/frappe/frappe-bench/sites:rw
- logs-vol:/home/frappe/frappe-bench/logs:rw - logs-vol:/home/frappe/frappe-bench/logs:rw
fix-vol-permissions:
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
user: root
command: chown -R 1000:1000 /sites /assets /logs
volumes:
- sites-vol:/sites
- assets-vol:/assets
- logs-vol:/logs
volumes: volumes:
mariadb-vol: mariadb-vol:
redis-cache-vol: redis-cache-vol:

View File

@ -20,7 +20,6 @@ services:
- frappe-worker-default - frappe-worker-default
- frappe-worker-long - frappe-worker-long
- frappe-worker-short - frappe-worker-short
- fix-vol-permissions
links: links:
- [app]-python - [app]-python
- frappe-socketio - frappe-socketio
@ -118,15 +117,6 @@ services:
- sites-vol:/home/frappe/frappe-bench/sites:rw - sites-vol:/home/frappe/frappe-bench/sites:rw
- logs-vol:/home/frappe/frappe-bench/logs:rw - logs-vol:/home/frappe/frappe-bench/logs:rw
fix-vol-permissions:
image: [app]-worker
user: root
command: chown -R 1000:1000 /sites /assets /logs
volumes:
- sites-vol:/sites
- assets-vol:/assets
- logs-vol:/logs
volumes: volumes:
assets-vol: assets-vol:
sites-vol: sites-vol:

View File

@ -18,7 +18,6 @@ services:
- frappe-worker-default - frappe-worker-default
- frappe-worker-long - frappe-worker-long
- frappe-worker-short - frappe-worker-short
- fix-vol-permissions
links: links:
- erpnext-python - erpnext-python
- frappe-socketio - frappe-socketio
@ -115,15 +114,6 @@ services:
- sites-vol:/home/frappe/frappe-bench/sites:rw - sites-vol:/home/frappe/frappe-bench/sites:rw
- logs-vol:/home/frappe/frappe-bench/logs:rw - logs-vol:/home/frappe/frappe-bench/logs:rw
fix-vol-permissions:
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
user: root
command: chown -R 1000:1000 /sites /assets /logs
volumes:
- sites-vol:/sites
- assets-vol:/assets
- logs-vol:/logs
volumes: volumes:
assets-vol: assets-vol:
sites-vol: sites-vol:

View File

@ -18,7 +18,6 @@ services:
- frappe-worker-default - frappe-worker-default
- frappe-worker-long - frappe-worker-long
- frappe-worker-short - frappe-worker-short
- fix-vol-permissions
links: links:
- frappe-python - frappe-python
- frappe-socketio - frappe-socketio
@ -115,15 +114,6 @@ services:
- sites-vol:/home/frappe/frappe-bench/sites:rw - sites-vol:/home/frappe/frappe-bench/sites:rw
- logs-vol:/home/frappe/frappe-bench/logs:rw - logs-vol:/home/frappe/frappe-bench/logs:rw
fix-vol-permissions:
image: frappe/frappe-worker:${ERPNEXT_VERSION}
user: root
command: chown -R 1000:1000 /sites /assets /logs
volumes:
- sites-vol:/sites
- assets-vol:/assets
- logs-vol:/logs
volumes: volumes:
assets-vol: assets-vol:
sites-vol: sites-vol:

View File

@ -53,8 +53,8 @@ check_health() {
print_group Loop health check print_group Loop health check
docker run --name frappe_doctor \ docker run --name frappe_doctor \
-v "$1_sites-vol:/home/frappe/frappe-bench/sites" \ -v "${project_name}_sites-vol:/home/frappe/frappe-bench/sites" \
--network "$1_default" \ --network "${project_name}_default" \
frappe/frappe-worker:edge doctor || true frappe/frappe-worker:edge doctor || true
cmd='docker logs frappe_doctor | grep "Health check successful" || echo ""' cmd='docker logs frappe_doctor | grep "Health check successful" || echo ""'

View File

@ -38,7 +38,7 @@ docker run \
--network ${project_name}_default \ --network ${project_name}_default \
postgres:11.8 postgres:11.8
check_health $project_name check_health
print_group "Create new site " print_group "Create new site "
SITE_NAME=test.localhost SITE_NAME=test.localhost
@ -133,7 +133,7 @@ docker_compose_with_args stop
docker container prune -f && docker volume prune -f docker container prune -f && docker volume prune -f
docker_compose_with_args up -d docker_compose_with_args up -d
check_health $project_name check_health
print_group Restore backup from S3 print_group Restore backup from S3
docker run \ docker run \
@ -149,7 +149,7 @@ docker run \
--network ${project_name}_default \ --network ${project_name}_default \
frappe/frappe-worker:edge restore-backup frappe/frappe-worker:edge restore-backup
check_health $project_name check_health
ping_site ping_site
SITE_NAME=$PG_SITE_NAME ping_site SITE_NAME=$PG_SITE_NAME ping_site
@ -163,7 +163,7 @@ docker run \
--network ${project_name}_default \ --network ${project_name}_default \
frappe/frappe-worker:edge new frappe/frappe-worker:edge new
check_health $project_name check_health
SITE_NAME=$EDGE_SITE_NAME ping_site SITE_NAME=$EDGE_SITE_NAME ping_site
print_group Migrate edge site print_group Migrate edge site

View File

@ -24,6 +24,14 @@ FRAPPE_VERSION=$FRAPPE_VERSION ERPNEXT_VERSION="test" \
-f installation/erpnext-publish.yml \ -f installation/erpnext-publish.yml \
up -d up -d
docker run \
--rm \
--user root \
-v ${project_name}_sites-vol:/sites \
-v ${project_name}_assets-vol:/assets \
-v ${project_name}_logs-vol:/logs \
frappe/erpnext-worker:test chown -R 1000:1000 /logs /sites /assets
print_group Create site print_group Create site
docker run \ docker run \
--rm \ --rm \
@ -33,13 +41,5 @@ docker run \
--network ${project_name}_default \ --network ${project_name}_default \
frappe/erpnext-worker:test new frappe/erpnext-worker:test new
docker restart ${project_name}_erpnext-nginx_1
docker restart ${project_name}_fix-vol-permissions_1
check_health $project_name
# TODO: remove when pr ci run successful
docker logs ${project_name}_erpnext-nginx_1
ping_site ping_site
rm .env rm .env