giansalex / peru-consult-api

API de Consulta de DNI y RUC - Perú (Docker, GraphQL)
https://giansalex.github.io/peru-consult-docs/
MIT License
75 stars 39 forks source link

Error with deploy in docker #34

Closed max-dicson-cf closed 2 years ago

max-dicson-cf commented 2 years ago

Hola tengo este problema al desplegar en un contenedor de docker:

> --   | > ReactPHP HTTP Server for DriftPHP   | > by Marc Morera (@mmoreram)   | >   | > Host: 0.0.0.0   | > Port: 8080   | > Environment: prod   | > Debug: disabled   | > Static Folder: /public/   | > Adapter: App\AppKernelAdapter   | > Workers: 8   | > Exchanges subscribed: disabled   | > Loaded bootstrap file: /var/www/html/config/bootstrap.php   | > Allowed number of loop stops: 0   | >   |     |     | In Filesystem.php line 179:   |     | Failed to remove file "/var/www/html/var/cache/prod/annotations.map": unlin   | k(/var/www/html/var/cache/prod/annotations.map): Permission denied   |     |     | run [--env [ENV]] [--dev] [--almost-quiet] [--static-folder [STATIC-FOLDER]] [--no-static-folder] [--debug] [--no-header] [--no-cookies] [--no-file-uploads] [--concurrent-requests [CONCURRENT-REQUESTS]] [--request-body-buffer [REQUEST-BODY-BUFFER]] [--adapter [ADAPTER]] [--allowed-loop-stops [ALLOWED-LOOP-STOPS]] [--workers [WORKERS]] [--]

Me imagino que tiene que ver con la imagen del docker.

Espero pueda ayudarme gracias. Docker Image: giansalex/peru-consult-api:latest

mmoreram commented 2 years ago

Buenas!

Me he encontrado con esto alguna vez. Cuando instala los vendors, se pone a eliminar cosas. Le echo un vistazo cuando pueda, a ver si puede ser hoy a media tarde.

Gracias!

max-dicson-cf commented 2 years ago

Muchisimas gracias. Estaré apoyando buscando algunas incidencias si es que los encuentro. Saludos.

max-dicson-cf commented 2 years ago

Hola ?

mmoreram commented 2 years ago

Hola. Aún no he tenido el tiempo para revisar nada. Puedes adelantarte tu, e investigarlo. Saludos.

giansalex commented 2 years ago

@max-dicson-cf estas usando la imagen disponible en docker hub?, o la estas construyendo tu mismo. Probé desde un entorno remoto como Katacoda - Docker Playground, y no se presenta ningún error.

max-dicson-cf commented 2 years ago

Hola, estoy desplegando en un Openshift la imagen oficial es de dockerhub. Es raro


apiVersion: apps/v1 kind: Deployment metadata: name: chma-entity-system-v1 namespace: prod spec: selector: matchLabels: run: chma-entity-system-v1 replicas: 2 template: metadata: labels: run: chma-entity-system-v1 spec: containers:

max-dicson-cf commented 2 years ago

Al fin, el problema era los permisos efectivamente.

tuve que montar un volumen y colocar una propiedad de readOnline: false:

   - name: cache
      mountPath: /var/www/html/var/cache
      readOnline: false

con esto levanto sin problemas.

Saludos.