# Ghost docker exit with error

**URL:** <https://forum.ghost.org/t/ghost-docker-exit-with-error/47675>\
**Category:** Developer help\
**Created:** [May 26, 2024, 12:56pm UTC](https://forum.ghost.org/t/ghost-docker-exit-with-error/47675 "2024-05-26T12:56:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oleg\_Ruchovets](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/oleg_ruchovets/32/26194_2.png) [@Oleg\_Ruchovets](https://forum.ghost.org/u/Oleg_Ruchovets)\
**Post date:** [May 26, 2024, 12:56pm UTC](https://forum.ghost.org/t/ghost-docker-exit-with-error/47675/1 "2024-05-26T12:56:31Z")

</div>

I am running a test environment Ubunthu (AWS lightsail).

I have a docker-compose ghost + caddy + PostgreSQL  
docker-compose.yml

ghost:  
image: ghost:latest  
container\_name: ghost  
networks:

- ghost-network  
volumes:
- ghost-data:/var/lib/ghost/content  
environment:  
url: [http://xyz.co/blog](http://xyz.co/blog)  
database\_\_client: pg  
database\_\_connection\_\_host: postgres  
database\_\_connection\_\_user: ghost  
database\_\_connection\_\_password: ghost\_password  
database\_\_connection\_\_database: ghost\_db  
command: sh -c “npm install pg && npm install && npm start”

here is what I see in log files?

sudo docker-compose logs ghost  
Attaching to ghost  
ghost |  
ghost | added 14 packages in 2s  
ghost |  
ghost | up to date, audited 15 packages in 674ms  
ghost |  
ghost | found 0 vulnerabilities  
ghost | npm error Missing script: “start”  
ghost | npm error  
ghost | npm error Did you mean one of these?  
ghost | npm error npm star # Mark your favorite packages  
ghost | npm error npm stars # View packages marked as favorites  
ghost | npm error  
ghost | npm error To see a list of scripts, run:  
ghost | npm error npm run  
ghost |  
ghost | npm error A complete log of this run can be found in: /root/.npm/\_logs/2024-05-26T12\_38\_58\_301Z-debug-0.log  
u

please advise how to fix the issue?

Thanks

---

<div class="post-metadata">

**Author:** ![jannis](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jannis/32/39718_2.png) [@jannis](https://forum.ghost.org/u/jannis)\
**Post date:** [May 26, 2024, 1:40pm UTC](https://forum.ghost.org/t/ghost-docker-exit-with-error/47675/2 "2024-05-26T13:40:44Z")

</div>

Postgres is not support. The only supported database is MySQL 8:

> **[Supported databases in production for self-hosting Ghost - Ghost Developers](https://ghost.org/docs/faq/supported-databases/)**
>
> Find out what databases are supported for a production install of Ghost, and learn how to migrate your database.

Also, Ghost does not have a `start` script defined in the `package.json`. This line…

> [@Oleg\_Ruchovets](#):
>
> ghost | npm error Missing script: “start”

…confirms that.

What you posted does not look like a full docker compose file. We will need that to properly help you debug this.

However, why invent the wheel? There are plenty of working docker compose files out there. For example, this one:

> **[Self Hosting a Ghost blog with docker-compose, Mailgun setup, and Stripe...](https://www.ajfriesen.com/self-hosting-ghost-with-docker-compose/)**
>
> How to run your Ghost blog with docker-compose, set up Mailgun for mails, and stripe for paid subscriptions.

It also uses Caddy – so, all the boxes checked for you.

---

<div class="post-metadata">

**Author:** ![Oleg\_Ruchovets](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/oleg_ruchovets/32/26194_2.png) [@Oleg\_Ruchovets](https://forum.ghost.org/u/Oleg_Ruchovets)\
**Post date:** [May 26, 2024, 2:14pm UTC](https://forum.ghost.org/t/ghost-docker-exit-with-error/47675/3 "2024-05-26T14:14:42Z")

</div>

Great @jannis.  
Thank you for the fast response, I will try the docker-compose you’ve suggested.
