# Defaultish app won't rebuild

**URL:** <https://meta.discourse.org/t/defaultish-app-wont-rebuild/126245>\
**Category:** Self-hosting\
**Created:** [August 20, 2019, 3:13am UTC](https://meta.discourse.org/t/defaultish-app-wont-rebuild/126245 "2019-08-20T03:13:00Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![slimmons](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@slimmons](https://meta.discourse.org/u/slimmons)\
**Post date:** [August 20, 2019, 3:13am UTC](https://meta.discourse.org/t/defaultish-app-wont-rebuild/126245/1 "2019-08-20T03:13:00Z")

</div>

Hey, I set up the default discourse on a linux machine using this [guide](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md). It went super smoothly, and the site came up perfectly.

I decided to allow users to connect via facebook, so I went through the facebook instructions linked to from the above link (I’d link again but new users can only post 2 links apparently). That ended up not working, but the site was still up and running (I don’t remember the error I got when trying to log in via facebook).

While going through the facebook docs I saw something about needing to have https enabled, so I started going through [these docs.](https://meta.discourse.org/t/setting-up-https-support-with-lets-encrypt/40709). That all went well until the `./launcher rebuild app`, where I got a postgres error. Which surprised me, because I hadn’t done anything to the postgres config (to the best of my knowledge). The first error is below:

```
INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

```

I didn’t stop the postgres service, but I tried running `service start postgres` and it said it wasn’t installed. So I assume it’s installed automatically some other way than I’m used to. Any ideas on what I could have done wrong? Thanks

my `container/app.yml`:

```
templates:
  - "templates/web.template.yml"
  - "templates/web.ssl.template.yml"
  - "templates/web.letsencrypt.ssl.template.yml"
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"

expose:
  - "80:80" # http
  - "443:443" # https

params:
  db_default_text_search_config: "pg_catalog.english"

  db_shared_buffers: "128MB"

env:
  LANG: en_US.UTF-8
  LETSENCRYPT_ACCOUNT_EMAIL: 'myotheremail@gmail.com'
  UNICORN_WORKERS: 2

  DISCOURSE_HOSTNAME: mysite.com

  DISCOURSE_DEVELOPER_EMAILS: 'myemail@gmail.com'

  DISCOURSE_SMTP_ADDRESS: smtp.gmail.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: myemail@gmail.com
  DISCOURSE_SMTP_PASSWORD: "myPa$$word"

  ## The http or https CDN address for this Discourse instance (configured to pull)
  ## see https://meta.discourse.org/t/14857 for details
  #DISCOURSE_CDN_URL: https://discourse-cdn.example.com

volumes:
  - volume:
      host: /var/discourse/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse/shared/standalone/log/var-log
      guest: /var/log

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git

run:
  - exec: echo "Beginning of custom commands"
  - exec: echo "End of custom commands"

```

---

_[View the full topic](https://meta.discourse.org/t/defaultish-app-wont-rebuild/126245)._
