GithubHelp home page GithubHelp logo

docker-postal's Introduction

Hi!

I'm Gary, an DevOps Engineer living in London, United Kingdom.

Currently, I work at Procore helping to deliver new AI/Data products.

Daily Tools

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

Platforms

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

Languages

Static Badge Static Badge Static Badge Static Badge Static Badge

docker-postal's People

Contributors

badjware avatar denji avatar jap42 avatar mystarinyoursky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-postal's Issues

Bootstrapping Automation

Hello,

Awesome project so far, for something like this i was hoping for a long time !

The only thing im currently fighting with, is to get it even a bit more stateless.

Currently the database needs to be bootstrapped upfront (which is super easy if you dont include your custom config).

But if youre in a fresh environment (where db / rabbitmq is not initialized yet) postal fails to start because of missing tables/databases.

How to reproduce:
just clone the repo in a fresh env.
and include your own custom config: https://github.com/CatDeployed/docker-postal/blob/master/ubuntu/docker-compose.yml#L15

In this case the Bootstrap (create db / tables and seeds) is skipped.
Is there a way to force it / make it check if the tables are missing and bootstrap those?

Or do i always have to boostrap those tables manually upfront?
And then modify the docker-compose?

How do I restart this service ?

There is some bootstrapping that takes place that starts the service fine. But if I restart the service it gives me all sorts of problems.

Front office JS & CSS dependencies broken

Hi,

This is the log of the browser :

Refused to apply style from 'http://portal/stylesheets/application/application.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
application.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
/favicon.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
portal/:1 Refused to apply style from 'http://portal/stylesheets/application/application.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

With the same version, not containerized, everything is working.
I don't get a clue.

Can I pass in my own MYSQL_HOST ?

I tried manually changing /opt/postal/config/postal.yml and that did not work. I'd like to connect postal to a separate mysql db service via ip/domain name. Any clues on how to do this would be appreicated. Thank!

config needs to be bound to the host

The postal.yml file needs to be bound to the host or you can not get the configurations to save properly. Including domains which revert back to postal.example.com.

Unfortunatlly, when trying to add ./data/config:/opt/postal/config to the volumes, the container will no longer start because of missing directories. Non of the sub directories seem to create if its mapped.

Postal admin user creation error

Hello,

When launching dock-compose up it appears there is no postal admin user created.

When trying to execute the create-user.sh form the postal docker, it needs to be launched several times to succeed (two times most of the times).

Here is the kind of error I get (note that password is revealed) :

bash-5.1# ./create-user.sh
spawn /opt/postal/bin/postal make-user
Postal User Creator
Enter the information required to create a new Postal user.
This tool is usually only used to create your initial admin user.

E-Mail Address      : [email protected]
First Name          : postal
Last Name           : postal
Initial Password:   : SecretCatPassword


Failed to create user
 * Password can't be blank

Any ideas what could be wrong ? (some delay or timeout issue with spawn?)

Login Fails with Alpine,works w/ Ubuntu

I've used the default POSTAL_EMAIL POSTAL_PASSWORD and changed them. Here' is my logs

23:45:27 web.1              | => [web.1:196] [2020-09-06T23:45:27.719] INFO -- : Started GET "/login?return_to=%2F" for 172.19.0.5 at 2020-09-06 23:45:27 +0000
23:45:27 web.1              | => [web.1:196] [2020-09-06T23:45:27.720] INFO -- : Processing by SessionsController#new as HTML
23:45:27 web.1              | => [web.1:196] [2020-09-06T23:45:27.720] INFO -- :   Parameters: {"return_to"=>"/"}
23:45:27 web.1              | => [web.1:196] [2020-09-06T23:45:27.721] INFO -- :   Rendering sessions/new.html.haml within layouts/sub
23:45:27 web.1              | => [web.1:196] [2020-09-06T23:45:27.722] INFO -- :   Rendered sessions/new.html.haml within layouts/sub (0.9ms)
23:45:27 web.1              | => [web.1:196] [2020-09-06T23:45:27.723] INFO -- : Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)
23:45:27 web.1              | => 172.19.0.1 - - [06/Sep/2020:23:45:27 +0000] "GET /login?return_to=%2F HTTP/1.0" 200 - 0.0054
23:45:36 web.1              | => [web.1:196] [2020-09-06T23:45:36.405] INFO -- : Started POST "/login" for 172.19.0.5 at 2020-09-06 23:45:36 +0000
23:45:36 web.1              | => [web.1:196] [2020-09-06T23:45:36.405] INFO -- : Processing by SessionsController#create as HTML
23:45:36 web.1              | => [web.1:196] [2020-09-06T23:45:36.405] INFO -- :   Parameters: {"utf8"=>"✓", "authenticity_token"=>"0hv41D99H+IRTcxz19WDuqHplC19re0S+fqTo1QW2zjuDwmP2Pf7kzFJLUXGt/OPnbBm0ed6xnJ0pqyPZY1+Og==", "return_to"=>"/", "email_address"=>"[email protected]", "password"=>"[FILTERED]", "commit"=>"Login"}
23:45:36 web.1              | => [web.1:196] [2020-09-06T23:45:36.407] INFO -- :   Rendering sessions/new.html.haml within layouts/sub
23:45:36 web.1              | => [web.1:196] [2020-09-06T23:45:36.408] INFO -- :   Rendered sessions/new.html.haml within layouts/sub (0.6ms)
23:45:36 web.1              | => [web.1:196] [2020-09-06T23:45:36.408] INFO -- : Completed 200 OK in 3ms (Views: 1.3ms | ActiveRecord: 0.3ms)
23:45:36 web.1              | => 172.19.0.1 - - [06/Sep/2020:23:45:36 +0000] "POST /login HTTP/1.0" 200 - 0.0048

editing postal.yml

Hi,

Am I supposed to be editing the postal.yml file somewhere at some time in the process of initially setting up docker-postal?

Static assets

Looks like the static assets aren't served and the Postal installation docs expect nginx to be set up to serve them. I can attempt a PR that adds a nginx service to the docker-compose if necessary.

unable to run: rake aborted

Hi!
I tried to clone this repository and start the docker-compose file (tried both with ubuntu and alpine) after following the instructions, however I cannot manage to make it run. Here is the log of the postal service:


== Waiting for MySQL and RabbitMQ to start up ==
2020/05/12 12:08:51 Waiting for: tcp://mysql:3306
2020/05/12 12:08:51 Waiting for: http://rabbitmq:5672/api/aliveness-test
2020/05/12 12:08:51 Connected to tcp://mysql:3306
2020/05/12 12:08:51 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:52 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:53 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:54 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:55 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:56 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:57 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:58 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:59 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:09:00 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:09:01 Timeout after 10s waiting on dependencies to become available: [tcp://mysql:3306 http://rabbitmq:5672/api/aliveness-test]
Initializing database
rake aborted!
Errno::EISDIR: Is a directory @ io_fillbuf - fd:5 /opt/postal/config/postal.yml
/opt/postal/lib/postal/config.rb:64:in `yaml_config'
/opt/postal/lib/postal/config.rb:31:in `config'
/opt/postal/lib/postal/config.rb:76:in `database_url'
/opt/postal/config/boot.rb:11:in `<top (required)>'
/opt/postal/config/application.rb:1:in `require_relative'
/opt/postal/config/application.rb:1:in `<top (required)>'
/opt/postal/Rakefile:4:in `require_relative'
/opt/postal/Rakefile:4:in `<top (required)>'
/opt/postal/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/usr/local/bundle/bin/bundle:23:in `load'
/usr/local/bundle/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)
/usr/local/lib/ruby/2.6.0/psych.rb:577:in `initialize': Is a directory @ io_fillbuf - fd:5 /opt/postal/config/postal.yml (Errno::EISDIR)
        from /usr/local/lib/ruby/2.6.0/psych.rb:577:in `open'
        from /usr/local/lib/ruby/2.6.0/psych.rb:577:in `load_file'
        from /opt/postal/lib/postal/config.rb:64:in `yaml_config'
        from /opt/postal/lib/postal/config.rb:31:in `config'
        from /opt/postal/lib/postal/config.rb:76:in `database_url'
        from /opt/postal/config/boot.rb:11:in `<top (required)>'
        from /opt/postal/config/application.rb:1:in `require_relative'
        from /opt/postal/config/application.rb:1:in `<top (required)>'
        from /opt/postal/config/environment.rb:2:in `require_relative'
        from /opt/postal/config/environment.rb:2:in `<top (required)>'
        from script/make_user.rb:4:in `require_relative'
        from script/make_user.rb:4:in `<main>'
/usr/local/lib/ruby/2.6.0/psych.rb:577:in `initialize': Is a directory @ io_fillbuf - fd:5 /opt/postal/config/postal.yml (Errno::EISDIR)
        from /usr/local/lib/ruby/2.6.0/psych.rb:577:in `open'
        from /usr/local/lib/ruby/2.6.0/psych.rb:577:in `load_file'
        from /opt/postal/lib/postal/config.rb:64:in `yaml_config'
        from /opt/postal/lib/postal/config.rb:31:in `config'
        from script/update_process_concurrency.rb:4:in `<main>'

docker-compose not working

docker-compose.yml in ubuntu
I change nothing here.

version: "3"
services:
  postal:
    #image: catdeployed/postal:ubuntu
    build: .
    container_name: postal
    command: run
    tty: true
    ports:
      - 127.0.0.1:25:25
    depends_on:
      - "mysql"
      - "rabbitmq"
    volumes:
#      - ./config/postal.yml:/opt/postal/config/postal.yml
      - persistent_assets:/storage
      - static_assets:/opt/postal/public
      - postal_assets:/opt/postal/public/assets
      - ./src/templates/:/templates
    environment:
      - MYSQL_ROOT_PASSWORD=changeme
      - MYSQL_DATABASE=postal
      - RABBITMQ_DEFAULT_USER=postal
      - RABBITMQ_DEFAULT_PASS=changeme
      - RABBITMQ_DEFAULT_VHOST=postal
      - POSTAL_FNAME=Sia
      - POSTAL_LNAME=Cat
      - POSTAL_PASSWORD=SecretCatPassword
      - [email protected]
    healthcheck:
      test: curl -sS http://127.0.0.1:5000 || exit 1
      interval: 5s
      timeout: 10s
      retries: 3
  mysql:
    image: mariadb:10
    container_name: postal_mysql
    volumes:
      - mysql_data:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=changeme
      - MYSQL_DATABASE=postal
  rabbitmq:
    image: rabbitmq:3-alpine
    container_name: postal_rabbitmq
    environment:
      - RABBITMQ_DEFAULT_USER=postal
      - RABBITMQ_DEFAULT_PASS=changeme
      - RABBITMQ_DEFAULT_VHOST=/postal
  nginx:
    image: nginx
    container_name: postal_nginx
    ports:
      - 80:80
    links:
      - postal
    depends_on:
      - postal
    volumes:
      - ./src/nginx.conf:/etc/nginx/conf.d/default.conf:ro
      - static_assets:/opt/postal/public:ro
      - postal_assets:/opt/postal/public/assets:ro
volumes:
  persistent_assets:
  static_assets:
  postal_assets:
  mysql_data:

and docker logs postal

chchang@hqdc039:~/docker/docker-postal/ubuntu$ docker logs postal
== Waiting for MySQL and RabbitMQ to start up ==
2020/09/26 02:44:04 Waiting for: tcp://mysql:3306
2020/09/26 02:44:04 Waiting for: tcp://rabbitmq:5672
2020/09/26 02:44:04 Problem with dial: dial tcp 172.21.0.2:3306: connect: connection refused. Sleeping 1s
2020/09/26 02:44:04 Problem with dial: dial tcp 172.21.0.3:5672: connect: connection refused. Sleeping 1s
2020/09/26 02:44:05 Connected to tcp://mysql:3306
2020/09/26 02:44:05 Problem with dial: dial tcp 172.21.0.3:5672: connect: connection refused. Sleeping 1s
2020/09/26 02:44:06 Problem with dial: dial tcp 172.21.0.3:5672: connect: connection refused. Sleeping 1s
2020/09/26 02:44:07 Problem with dial: dial tcp 172.21.0.3:5672: connect: connection refused. Sleeping 1s
2020/09/26 02:44:08 Problem with dial: dial tcp 172.21.0.3:5672: connect: connection refused. Sleeping 1s
2020/09/26 02:44:09 Problem with dial: dial tcp 172.21.0.3:5672: connect: connection refused. Sleeping 1s
2020/09/26 02:44:10 Connected to tcp://rabbitmq:5672
02:44:11 system             | Procodile supervisor started with PID 35
02:44:11 system             | Application root is /opt/postal
02:44:11 system             | Automatic respawning is disabled
02:44:11 system             | Reloading configuration
02:44:11 control            | Listening at /tmp/postal/pids/procodile.sock
02:44:11 web.1              | Started with PID 38
02:44:11 worker.1           | Started with PID 40
02:44:11 cron.1             | Started with PID 42
02:44:11 smtp.1             | Started with PID 44
02:44:11 requeuer.1         | Started with PID 46
02:44:11 smtp.1             | => rake aborted!
02:44:11 smtp.1             | => Postal::ConfigError: No Let's Encrypt private key found at /opt/postal/config/lets_encrypt.pem
02:44:11 smtp.1             | => /opt/postal/lib/postal/config.rb:198:in `check_config!'
02:44:11 smtp.1             | => /opt/postal/config/boot.rb:9:in `<top (required)>'
02:44:11 smtp.1             | => /opt/postal/config/application.rb:1:in `require_relative'
02:44:11 smtp.1             | => /opt/postal/config/application.rb:1:in `<top (required)>'
02:44:11 smtp.1             | => /opt/postal/Rakefile:4:in `require_relative'
02:44:11 smtp.1             | => /opt/postal/Rakefile:4:in `<top (required)>'
02:44:11 smtp.1             | => /opt/postal/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
02:44:11 smtp.1             | => /usr/local/bundle/bin/bundle:23:in `load'
02:44:11 smtp.1             | => /usr/local/bundle/bin/bundle:23:in `<main>'
02:44:11 smtp.1             | => (See full trace by running task with --trace)
02:44:11 web.1              | => Puma starting in single mode...
02:44:11 web.1              | => * Version 4.3.5 (ruby 2.6.6-p146), codename: Mysterious Traveller
02:44:11 web.1              | => * Min threads: 5, max threads: 5
02:44:11 web.1              | => * Environment: production
02:44:11 web.1              | => ! Unable to load application: Postal::ConfigError: No Let's Encrypt private key found at /opt/postal/config/lets_encrypt.pem
02:44:11 web.1              | => bundler: failed to load command: puma (/opt/postal/vendor/bundle/ruby/2.6.0/bin/puma)
02:44:11 web.1              | => Postal::ConfigError: No Let's Encrypt private key found at /opt/postal/config/lets_encrypt.pem
02:44:11 web.1              | =>   /opt/postal/lib/postal/config.rb:198:in `check_config!'
02:44:11 web.1              | =>   /opt/postal/config/boot.rb:9:in `<top (required)>'
02:44:11 web.1              | =>   /opt/postal/config/application.rb:1:in `require_relative'
02:44:11 web.1              | =>   /opt/postal/config/application.rb:1:in `<top (required)>'
02:44:11 web.1              | =>   /opt/postal/config/environment.rb:2:in `require_relative'
02:44:11 web.1              | =>   /opt/postal/config/environment.rb:2:in `<top (required)>'
02:44:11 web.1              | =>   config.ru:3:in `require_relative'
02:44:11 web.1              | =>   config.ru:3:in `block in <main>'
02:44:11 web.1              | =>   /opt/postal/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
02:44:11 web.1              | =>   /opt/postal/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
02:44:11 web.1              | =>   /opt/postal/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
02:44:11 web.1              | =>   /opt/postal/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
02:44:11 web.1              | =>   /opt/postal/vendor/bundle/ruby/2.6.0/gems/puma-4.3.5/lib/puma/configuration.rb:321:in `load_rackup'
02:44:11 web.1              | =>   /opt/postal/vendor/bundle/ruby/2.6.0/gems/puma-4.3.5/lib/puma/configuration.rb:246:in `app'
02:44:11 web.1              | =>   /opt/postal/vendor/bundle/ruby/2.6.0/gems/puma-4.3.5/lib/puma/runner.rb:155:in `load_and_bind'
02:44:11 web.1              | =>   /opt/postal/vendor/bundle/ruby/2.6.0/gems/puma-4.3.5/lib/puma/single.rb:98:in `run'
02:44:11 web.1              | =>   /opt/postal/vendor/bundle/ruby/2.6.0/gems/puma-4.3.5/lib/puma/launcher.rb:172:in `run'
02:44:11 web.1              | =>   /opt/postal/vendor/bundle/ruby/2.6.0/gems/puma-4.3.5/lib/puma/cli.rb:80:in `run'
02:44:11 web.1              | =>   /opt/postal/vendor/bundle/ruby/2.6.0/gems/puma-4.3.5/bin/puma:10:in `<top (required)>'
02:44:11 web.1              | =>   /opt/postal/vendor/bundle/ruby/2.6.0/bin/puma:23:in `load'
02:44:11 web.1              | =>   /opt/postal/vendor/bundle/ruby/2.6.0/bin/puma:23:in `<top (required)>'
02:44:11 worker.1           | => /opt/postal/lib/postal/config.rb:198:in `check_config!': No Let's Encrypt private key found at /opt/postal/config/lets_encrypt.pem (Postal::ConfigError)
02:44:11 worker.1           | => 	from /opt/postal/config/boot.rb:9:in `<top (required)>'
02:44:11 worker.1           | => 	from /opt/postal/config/application.rb:1:in `require_relative'
02:44:11 worker.1           | => 	from /opt/postal/config/application.rb:1:in `<top (required)>'
02:44:11 worker.1           | => 	from /opt/postal/config/environment.rb:2:in `require_relative'
02:44:11 worker.1           | => 	from /opt/postal/config/environment.rb:2:in `<top (required)>'
02:44:11 worker.1           | => 	from script/worker.rb:2:in `require_relative'
02:44:11 worker.1           | => 	from script/worker.rb:2:in `<main>'
02:44:11 cron.1             | => rake aborted!
02:44:11 cron.1             | => Postal::ConfigError: No Let's Encrypt private key found at /opt/postal/config/lets_encrypt.pem
02:44:11 cron.1             | => /opt/postal/lib/postal/config.rb:198:in `check_config!'
02:44:11 cron.1             | => /opt/postal/config/boot.rb:9:in `<top (required)>'
02:44:11 cron.1             | => /opt/postal/config/application.rb:1:in `require_relative'
02:44:11 cron.1             | => /opt/postal/config/application.rb:1:in `<top (required)>'
02:44:11 cron.1             | => /opt/postal/Rakefile:4:in `require_relative'
02:44:11 cron.1             | => /opt/postal/Rakefile:4:in `<top (required)>'
02:44:11 cron.1             | => /opt/postal/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
02:44:11 cron.1             | => /usr/local/bundle/bin/bundle:23:in `load'
02:44:11 cron.1             | => /usr/local/bundle/bin/bundle:23:in `<main>'
02:44:11 cron.1             | => (See full trace by running task with --trace)
02:44:11 requeuer.1         | => rake aborted!
02:44:11 requeuer.1         | => Postal::ConfigError: No Let's Encrypt private key found at /opt/postal/config/lets_encrypt.pem
02:44:11 requeuer.1         | => /opt/postal/lib/postal/config.rb:198:in `check_config!'
02:44:11 requeuer.1         | => /opt/postal/config/boot.rb:9:in `<top (required)>'
02:44:11 requeuer.1         | => /opt/postal/config/application.rb:1:in `require_relative'
02:44:11 requeuer.1         | => /opt/postal/config/application.rb:1:in `<top (required)>'
02:44:11 requeuer.1         | => /opt/postal/Rakefile:4:in `require_relative'
02:44:11 requeuer.1         | => /opt/postal/Rakefile:4:in `<top (required)>'
02:44:11 requeuer.1         | => /opt/postal/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
02:44:11 requeuer.1         | => /usr/local/bundle/bin/bundle:23:in `load'
02:44:11 requeuer.1         | => /usr/local/bundle/bin/bundle:23:in `<main>'
02:44:11 requeuer.1         | => (See full trace by running task with --trace)
02:44:14 web.1              | Process has stopped. Respawning not available.
02:44:14 web.1              | Removed PID file
02:44:14 worker.1           | Process has stopped. Respawning not available.
02:44:14 worker.1           | Removed PID file
02:44:14 cron.1             | Process has stopped. Respawning not available.
02:44:14 cron.1             | Removed PID file
02:44:14 smtp.1             | Process has stopped. Respawning not available.
02:44:14 smtp.1             | Removed PID file
02:44:14 requeuer.1         | Process has stopped. Respawning not available.
02:44:14 requeuer.1         | Removed PID file
02:44:14 system             | All processes have stopped
02:44:14 system             | Stopping Procodile supervisor

please , any suggestions ?

Using SSL

Hi,

Thank you for wrapping Postal into the docker container. Great job!

I have installed it on a server which will also have an email verification app running in a separate container, so I have used an Nginx server on top of this.
I am using my nginx server (outside of this container) for pointing to port 82 of this container.
On docker-postal, I have changed Nginx port from 80 to 82.
This works great and allows me adding new docker containers for using other applications but I have encountered one issue. When I install an ssl certificate on my host OS's Nginx server, I can access Postal admin via https, however when trying to send a message, I am getting an error:
422Unprocessable Entity

Maybe you could advise something? Should the SSL certificate be installed on the nginx container serving postal as well?

Many thanks,
Nick

Database re-initialized every time container is recreated

In entrypoint we have check for existence of postal.yml. If it does not exists - database is reinitialized. The problem is that postal.yml is not persistent.

Every time container is removed/recreated, the postal.yml is deleted forever. Thus, check will fail and database is reinitialized, even if it has live data in it.

Solution: either change check to check for actual database initialization (i.e. if tables are present), or use postal binary itself to check if it was initialized. Alternative is to persist generated postal.yml in docker-compose.yml.

Redirect Issue with Alt Port

The login redirect when you first try to access the web UI, it strips the port from the redirected URL so you can not use an alternate port.

how to run in localhost

hi,
when i try to run in localhost i got error with ssl certificate which i skip it with POSTAL_SKIP_CONFIG_CHECK=1 environment variable.
but i got error "If you are the application owner check the logs for more information."

SMTP port not used

Testing this container, I noticed that Postal starts listening on port 25, even though it's postal.yml contains smtp:port:2525.

I'm not sure if this is because postal.defaults.yml is overriding this ? Not sure either if it's a bug in this image or the Postal app.

No such file or directory

Hello,

A bug appear after run docker-compose up -d :

cp: cannot stat '/opt/postal/config-original/*': No such file or directory
/usr/local/lib/ruby/2.4.0/psych.rb:472:in `initialize': No such file or directory @ rb_sysopen - /opt/postal/config/postal.defaults.yml (Errno::ENOENT)
        from /usr/local/lib/ruby/2.4.0/psych.rb:472:in `open'
        from /usr/local/lib/ruby/2.4.0/psych.rb:472:in `load_file'
        from /opt/postal/lib/postal/config.rb:59:in `defaults'
        from /opt/postal/lib/postal/config.rb:29:in `config'
        from /opt/postal/lib/postal/config.rb:132:in `fast_server_default_private_key_path'
        from script/generate_initial_config.rb:30:in `<main>'
== Waiting for MySQL to start up ==
/usr/local/lib/ruby/2.4.0/psych.rb:472:in `initialize': No such file or directory @ rb_sysopen - /opt/postal/config/postal.defaults.yml (Errno::ENOENT)
        from /usr/local/lib/ruby/2.4.0/psych.rb:472:in `open'
        from /usr/local/lib/ruby/2.4.0/psych.rb:472:in `load_file'
        from /opt/postal/lib/postal/config.rb:59:in `defaults'
        from /opt/postal/lib/postal/config.rb:29:in `config'
        from script/update_process_concurrency.rb:4:in `<main>'

Postal-app will not restart

I have found an issue while starting this on my new server. If I restart the postal-app container (Or it is forced to restart) the app will fail to start and then the container exits with an error code. The message in the log is Error: Cannot be started in the foreground because supervisor already running

Worker process fails to start when app starts before rabbitmq

I have discovered an issue, my postal app container is dependent on rabbitmq container. However this only waits for container to start. No check for MQ to be ready. So the worker fails and re-spawning is disabled. So once rMQ is running I have to manually restart the postal app container.

I can think of 2 possible solutions,

  1. enable re-spawning of the processes in Procdile
  2. Add a health check for rabbitMQ in the docker-entrypoint file.

I don't have much experience with ether service, but I would think re-spawning capability might have other benefits.

fix wrapper.sh

sed -i -e'/main_db:/!b' -e ':a' -e "s/database.*/database: $MYSQL_DATABASE/;t trail" -e 'n;ba' -e ':trail' -e 'n;btrail' /opt/postal/config/postal.yml

variable from descritpion has been set, so I think it's a bug

image

[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

λ docker-postal\ubuntu (master -> origin)
λ docker-compose up

alpine the same

postal_mysql | 2020-02-19 16:25:35 0 [ERROR] Plugin 'InnoDB' init function returned error.
postal_mysql | 2020-02-19 16:25:35 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
postal_mysql | 2020-02-19 16:25:35 0 [ERROR] Unknown/unsupported storage engine: InnoDB
postal_mysql | 2020-02-19 16:25:35 0 [ERROR] Aborting
postal_mysql |
postal_mysql | Installation of system tables failed!  Examine the logs in
postal_mysql | /var/lib/mysql/ for more information.
postal_mysql |
postal_mysql | The problem could be conflicting information in an external
postal_mysql | my.cnf files. You can ignore these by doing:
postal_mysql |
postal_mysql |     shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
postal_mysql |
postal_mysql | You can also try to start the mysqld daemon with:
postal_mysql |
postal_mysql |     shell> /usr/sbin/mysqld --skip-grant-tables --general-log &
postal_mysql |
postal_mysql | and use the command line tool /usr/bin/mysql
postal_mysql | to connect to the mysql database and look at the grant tables:
postal_mysql |
postal_mysql |     shell> /usr/bin/mysql -u root mysql
postal_mysql |     mysql> show tables;
postal_mysql |
postal_mysql | Try 'mysqld --help' if you have problems with paths.  Using
postal_mysql | --general-log gives you a log in /var/lib/mysql/ that may be helpful.
postal_mysql |
postal_mysql | The latest information about mysql_install_db is available at
postal_mysql | https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
postal_mysql | You can find the latest source at https://downloads.mariadb.org and
postal_mysql | the maria-discuss email list at https://launchpad.net/~maria-discuss
postal_mysql |
postal_mysql | Please check all of the above before submitting a bug report
postal_mysql | at http://mariadb.org/jira
postal_mysql |
postal_mysql exited with code 1

default dkim record

Hi I'm having some trouble with my DKIM record.

Each time i run "docker-compose run postal default-dkim-record" a new container is created called ubuntu_postal_run_1, if ubuntu_postal_run_1 already exists then ubuntu_postal_run_2 is created & a dkim record gets generated but then the container closes & the record i have is not valid for the existing container which is called postal.

each time i do this a new dkim record is generated non of which are valid for the container i have running named postal.

is there a way of forcing docker-compose to run the command on a named container?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.