slashbase-go
slashbase-go copied to clipboard
Permission issue while running binary on server
- Replaced
var build = config.BUILD_SERVER
toBUILD_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.
- 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?
- 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 Are you running binary on server for production use? if yes, you could use the Makefile
build-server to build the binary.