How does i restart Redis?

I’m using Redis but everytime the container restart the Redis server turns off and then i have to enter in the console and then start the server from there but i want to make the server restart automatically it’s possible ? Thanks in advance!

Add whatever it is you’re running at the console to your start command in package.json. You can chain multiple commands by adding ‘&&’ between them e.g ‘webpack && node server.js’

1 Like

@Gareth but i’m using PM2 so when i start my app, pm2 breaks the script execution so it does not start the redis server :confused:
I tried: pm2 start ecosystem.json --attach && ./.data/redis-stable/redis-server
and ./.data/redis-stable/redis-server && pm2 start ecosystem.json --attach
none of those worked

nvm, got it working, thanks!