certat / do-portal

This project is in maintenance mode and will only receive bug fixes, but no new features. A new version of this software is being developed.
5 stars 5 forks source link

Error on docker-compose: Unable to read "secret.json" file #116

Closed ghost closed 4 years ago

ghost commented 4 years ago

Following the docker installation instructions gives this error:

sudo docker-compose up
[...]
Step 11/16 : EXPOSE 8081
 ---> Running in 7660dfe11375
Removing intermediate container 7660dfe11375
 ---> 8a041f870d5b
Step 12/16 : COPY --chown=cert:cert . /home/cert/customer-portal
 ---> 876fe80ea275
Step 13/16 : RUN    cp config/envs/docker.json config/envs/devel.json     && cp config/envs/docker.json config/envs/production.json     && PATH=$(npm bin):$PATH grunt
 ---> Running in 3accf6ba328f
Loading "Gruntfile.js" tasks...ERROR
>> Error: Unable to read "secret.json" file (Error code: ENOENT).

jit-grunt: Plugin for the "default" task not found.
If you have installed the plugin already, please setting the static mapping.
See https://github.com/shootaroo/jit-grunt#static-mappings

Warning: Task "default" failed. Use --force to continue.

Aborted due to warnings.

Execution Time (2020-03-30 13:41:04 UTC-0)
loading tasks  114ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 99%
Total 115ms

ERROR: Service 'portal-frontend' failed to build: The command '/bin/sh -c cp config/envs/docker.json config/envs/devel.json     && cp config/envs/docker.json config/envs/production.json     && PATH=$(npm bin):$PATH grunt' returned a non-zero code: 3

Branch master

ghost commented 4 years ago

Similar on branch devel:

[...]
epplication-app         | Restarting nginx: nginx.
epplication-app         | EPPlicationFCGI                                               [Started]
epplication-app         | EPPlicationTaskRunner                                         [Started]
epplication-app         | 2020-03-30 13:55:31 120 Starting TaskRunner
epplication-app         | FastCGI: manager (pid 114): initialized
portal-frontend         | audited 5517 packages in 8.57s
portal-frontend         | 
portal-frontend         | 17 packages are looking for funding
portal-frontend         |   run `npm fund` for details
portal-frontend         | 
portal-frontend         | found 129 vulnerabilities (106 low, 1 moderate, 22 high)
portal-frontend         |   run `npm audit fix` to fix them, or `npm audit` for details
epplication-app         | 2020-03-30 14:07:39 69 Starting TaskRunner
portal-frontend         | Loading "Gruntfile.js" tasks...ERROR
portal-frontend         | >> Error: Unable to read "secret.json" file (Error code: ENOENT).
portal-frontend         | 
portal-frontend         | jit-grunt: Plugin for the "serve" task not found.
portal-frontend         | If you have installed the plugin already, please setting the static mapping.
portal-frontend         | See https://github.com/shootaroo/jit-grunt#static-mappings
portal-frontend         | 
portal-frontend         | Warning: Task "serve" failed. Use --force to continue.
portal-frontend         | 
portal-frontend         | Aborted due to warnings.
portal-frontend         | 
portal-frontend         | 
portal-frontend         | Execution Time (2020-03-30 14:07:41 UTC-0)
portal-frontend         | loading tasks  87ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 100%
portal-frontend         | Total 87ms
portal-frontend         | 
proxy                   | dockergen.1 | 2020/03/30 14:07:41 Received event die for container 54820bc4937d
portal-frontend exited with code 3
proxy                   | dockergen.1 | 2020/03/30 14:07:41 Generated '/etc/nginx/conf.d/default.conf' from 6 containers
proxy                   | dockergen.1 | 2020/03/30 14:07:41 Running 'nginx -s reload'
epplication-app         | FastCGI: manager (pid 63): initialized

Then http://127.0.0.1:8081/ gives 503 Service Temporarily Unavailable

davewood commented 4 years ago

https://github.com/certat/do-portal/commit/9e420407179b2fd05f1b8f2b99bfb9efd929417b

davewood commented 4 years ago

secret.json is now created on docker startup

https://github.com/certat/do-portal/commit/f61e53ef96d175d0383e9cb7c14309e1e66b9a34

ghost commented 4 years ago

This error does not happen anymore on branch devel