question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

service "backend" is not running container 1 @shubham-samant

See original GitHub issue

@shubham-samant

You have to add -p or --project-name to your operations commands

like this :

docker compose -p ai-team-erp exec backend bench new-site sitename.com --mariadb-root-password admin@123 --admin-pssword admin@123 

It will work like this.

@pv4n check if that helps you!

_Originally posted by @sdfateh in https://github.com/frappe/frappe_docker/issues/924#issuecomment-1247921795_

I did the following:

docker compose -f compose.yaml \
  -f overrides/compose.noproxy.yaml \
  -f overrides/compose.erpnext.yaml \
  -f overrides/compose.mariadb.yaml \
  -f overrides/compose.redis.yaml \
  config > ~/gitops/docker-compose.yml
  
docker compose --project-name erp -f ~/gitops/docker-compose.yml up -d

docker compose exec backend bench new-site erpsite --mariadb-root-password <same as .env password> --admin-password <password> --install-app chat --project-name erp

docker ps: IMAGE COMMAND CREATED STATUS PORTS NAMES frappe/erpnext-nginx:v14.1.0 “/docker-entrypoint.…” 20 hours ago Up 20 hours 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp erp-frontend-1 frappe/erpnext-worker:v14.1.0 “bench worker --queu…” 20 hours ago Up 20 hours erp-queue-default-1 frappe/erpnext-worker:v14.1.0 “/home/frappe/frappe…” 20 hours ago Up 20 hours erp-backend-1 frappe/erpnext-worker:v14.1.0 “bench worker --queu…” 20 hours ago Up 20 hours erp-queue-long-1 frappe/erpnext-worker:v14.1.0 “bench schedule” 20 hours ago Up 20 hours erp-scheduler-1 frappe/frappe-socketio:v14.6.0 “docker-entrypoint.s…” 20 hours ago Up 20 hours erp-websocket-1 frappe/erpnext-worker:v14.1.0 “bench worker --queu…” 20 hours ago Up 20 hours erp-queue-short-1 mariadb:10.6 “docker-entrypoint.s…” 20 hours ago Up 20 hours (healthy) 3306/tcp erp-db-1 redis:6.2-alpine “docker-entrypoint.s…” 20 hours ago Up 20 hours 6379/tcp erp-redis-1

Still getting: service "backend" is not running container #1

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
shubham-samantcommented, Sep 15, 2022

@pv4n You have to pass -p <project_name> for the docker compose exec command as well. Eg:

docker compose -p <project_name>  \
exec backend bench new-site <site_name>.localhost \ # use .localhost not .com etc if running on localhost of your system
--mariadb-root-password <DB_PASSWORD from .env> \
--admin-password <set_new_password> 

Hope that helps!

0reactions
revantcommented, Sep 17, 2022

FRAPPE_SITE_NAME_HEADER should be that same <site_name> that is used in “…new-site <site_name>.localhost” right?

if it is set to $host it’ll auto pick from host header

https://nginx.org/en/docs/http/ngx_http_core_module.html#var_host

Read more comments on GitHub >

github_iconTop Results From Across the Web

Service "backend" is not running container #1 - ERPNext Forum
Hi I tried to create site using this command: docker compose exec backend bench new-site mysite --mariadb-root-password 123 --admin-password ...
Read more >
Check is container/service running with docker-compose
But when you run it for the service which has no running service containers, it will show an error: ~/apperture-science $ docker-compose ...
Read more >
Docker-compose up exited with code 1 but successful docker ...
docker ps shows that the postgres container is still running but the frontend and backend still exit. Using npm start, there is no...
Read more >
docker compose exec - Docker Documentation
Detached mode: Run command in the background. index of the container if there are multiple instances of a service [default: 1]. Keep STDIN...
Read more >
How to run database, backend and frontend in a single-click ...
In this blog post I would like to show you how easy you can run 3 different Docker containers all at once using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found