Our ErpNext instance is setup using docker-compose, but after a server power off and power on, I get a 502 Bad Gateway
error on
After,
docker-compose -p erp -f docker-compose-common.yml -f docker-compose-erpnext.yml stop
docker-compose -p erp -f docker-compose-common.yml -f docker-compose-erpnext.yml start
# docker-compose -p erp -f docker-compose-common.yml -f docker-compose-erpnext.yml ps
Name Command State Ports
------------------------------------------------------------------------------
erp_erpnext-nginx_1 /docker- Up 0.0.0.0:8080->80/tc
entrypoint.sh ngin p
...
erp_erpnext-python_1 docker-entrypoint.sh Restarting
start
erp_frappe- docker-entrypoint.sh Restarting
schedule_1 schedule
erp_frappe- docker-entrypoint.sh Up
socketio_1 start
erp_frappe-worker- docker-entrypoint.sh Restarting
default_1 worker
erp_frappe-worker- docker-entrypoint.sh Restarting
long_1 worker
erp_frappe-worker- docker-entrypoint.sh Up 8000/tcp
short_1 worker
erp_mariadb_1 docker-entrypoint.sh Up 3306/tcp
mysqld
erp_redis-cache_1 docker-entrypoint.sh Up 6379/tcp
redis ...
erp_redis-queue_1 docker-entrypoint.sh Up 6379/tcp
redis ...
erp_redis-socketio_1 docker-entrypoint.sh Up 6379/tcp
redis ...
4 containers are on a reboot loop.
# cat docker-compose-common.yml
version: '3'
services:
redis-cache:
image: redis:latest
restart: on-failure
volumes:
- redis-cache-vol:/data
redis-queue:
image: redis:latest
restart: on-failure
volumes:
- redis-queue-vol:/data
redis-socketio:
image: redis:latest
restart: on-failure
volumes:
- redis-socketio-vol:/data
mariadb:
image: mariadb:10.3
restart: on-failure
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- ./frappe-mariadb.cnf:/etc/mysql/conf.d/frappe.cnf
- mariadb-vol:/var/lib/mysql
volumes:
mariadb-vol:
redis-cache-vol:
redis-queue-vol:
redis-socketio-vol:
# cat docker-compose-erpnext.yml
version: '3'
services:
erpnext-nginx:
image: frappe/erpnext-nginx:${ERPNEXT_VERSION}
restart: on-failure
environment:
- FRAPPE_PY=erpnext-python
- FRAPPE_PY_PORT=8000
- FRAPPE_SOCKETIO=frappe-socketio
- SOCKETIO_PORT=9000
- LETSENCRYPT_HOST=${SITES}
- VIRTUAL_HOST=${SITES}
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
depends_on:
- erpnext-python
- frappe-socketio
- frappe-worker-default
- frappe-worker-long
- frappe-worker-short
links:
- erpnext-python
- frappe-socketio
- frappe-worker-default
- frappe-worker-long
- frappe-worker-short
volumes:
- sites-vol-1:/var/www/html/sites:rw
- assets-vol-1:/assets:rw
ports:
- 8080:80
erpnext-python:
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
restart: on-failure
environment:
- MARIADB_HOST=${MARIADB_HOST}
- REDIS_CACHE=redis-cache:6379
- REDIS_QUEUE=redis-queue:6379
- REDIS_SOCKETIO=redis-socketio:6379
- SOCKETIO_PORT=9000
- AUTO_MIGRATE=1
volumes:
- sites-vol-1:/home/frappe/frappe-bench/sites:rw
- assets-vol-1:/home/frappe/frappe-bench/sites/assets:rw
frappe-socketio:
image: frappe/frappe-socketio:v12
restart: on-failure
depends_on:
- redis-socketio
links:
- redis-socketio
volumes:
- sites-vol-1:/home/frappe/frappe-bench/sites:rw
frappe-worker-default:
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
restart: on-failure
command: worker
depends_on:
- redis-queue
- redis-cache
links:
- redis-queue
- redis-cache
volumes:
- sites-vol-1:/home/frappe/frappe-bench/sites:rw
frappe-worker-short:
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
restart: on-failure
command: worker
environment:
- WORKER_TYPE=short
depends_on:
- redis-queue
- redis-cache
links:
- redis-queue
- redis-cache
volumes:
- sites-vol-1:/home/frappe/frappe-bench/sites:rw
frappe-worker-long:
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
restart: on-failure
command: worker
environment:
- WORKER_TYPE=long
depends_on:
- redis-queue
- redis-cache
links:
- redis-queue
- redis-cache
volumes:
- sites-vol-1:/home/frappe/frappe-bench/sites:rw
frappe-schedule:
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
restart: on-failure
command: schedule
depends_on:
- redis-queue
- redis-cache
links:
- redis-queue
- redis-cache
volumes:
- sites-vol-1:/home/frappe/frappe-bench/sites:rw
site-creator:
image: frappe/erpnext-worker:v12.12.0
restart: "no"
command: new
depends_on:
- erpnext-python
environment:
- SITE_NAME=${SITE_NAME}
- DB_ROOT_USER=${DB_ROOT_USER}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- INSTALL_APPS=${INSTALL_APPS}
volumes:
- sites-vol-1:/home/frappe/frappe-bench/sites:rw
volumes:
assets-vol-1:
sites-vol-1:
ERPNEXT_VERSION=v12.12.0
FRAPPE_VERSION=v12.12.0
docker logs erp_frappe-worker-default_1
You are required to change your password immediately (password expired)
Current password: su: Authentication token manipulation error
Changing password for frappe.
Any ideas to resolve this?
cc @revant_one