debuglevel / greeting-microservice

Micronaut microservice template written in Kotlin
The Unlicense
5 stars 2 forks source link

Default permissions for /data fail #13

Closed debuglevel closed 3 years ago

debuglevel commented 3 years ago
## 172.16.0.240/29 address-geocoding
  address-geocoding:
    enabled: true
    services:
      address-geocoding-rest:
        image: registry.gitlab.com/debuglevel/address-geocoding:0-0-10
        environment:
         - DATASOURCES_DEFAULT_URL=jdbc:h2:file:/data/database/address-geocoding
        volumes:
          - address-geocoding-database:/data/database
        networks:
          address-geocoding-net:
            ipv4_address: 172.16.0.242
    volumes:
      address-geocoding-database:
    networks:
      address-geocoding-net:
        driver: bridge
        ipam:
          driver: default
          config:
            - subnet: 172.16.0.240/29

fails with

Caused by: java.io.FileNotFoundException: /data/database/address-geocoding.mv.db (Permission denied)

because the volume is created with rights for root. See https://github.com/moby/moby/issues/2259

Maybe creating /data in Dockerfile with appropriate USER rights set would help

debuglevel commented 3 years ago

should now work