slashbase-go icon indicating copy to clipboard operation
slashbase-go copied to clipboard

Permission issue while running binary on server

Open shivamsouravjha opened this issue 10 months ago • 2 comments

  • Replaced var build = config.BUILD_SERVER to BUILD_SERVER
  • On my main.go file level created a docker-compose fiel with contents
version: '3.8'

services:
  slashbase-db:
    image: postgres
    container_name: slashbase-db
    restart: always
    ports:
      - '5432:5432'
    volumes:
      - ./data/postgres/data:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: petclinic
      POSTGRES_USER: petclinic
      POSTGRES_PASSWORD: petclinic
    healthcheck:
      test: pg_isready -U petclinic -d petclinic
      interval: 5s
      timeout: 5s
      retries: 3
  • In development.server.env passed the values
APP_DB_HOST=localhost
APP_DB_PORT=5432
APP_DB_USER=petclinic
APP_DB_PASS=petclinic
APP_DB_NAME=petclinic
  • always I get the permission with data. image
  • I understand a solution would be to give chmod , but to no avail, similar issue happens.
  • When worked with docker image it works fine.
  • Any viable solution?

shivamsouravjha avatar Apr 15 '24 12:04 shivamsouravjha

  • A work around for this was giving sudo access to wails, meaning passing privileges to the command via env.
  • Still I don't believe this is a great approach of running the same.

shivamsouravjha avatar Apr 16 '24 06:04 shivamsouravjha

@shivamsouravjha Are you running binary on server for production use? if yes, you could use the Makefile build-server to build the binary.

paraswaykole avatar Apr 22 '24 02:04 paraswaykole