When I run the container we docker-compose it keeps restarting. when I run docker logs node (name of container) there is no logs. Not sure what I am doing wrong here can you help please?
Everything work perfect with the dockerrun command
docker run --rm -it --name node-docker
-v $PWD:/home/app -w /home/app
-e “PORT=3000” -p 8080:3000
-u node node:latest /bin/bash
Dockerfile in node folder
FROM node:latest
WORKDIR /home/app
USER node
ENV PORT 3000
EXPOSE 3000
ENTRYPOINT /bin/bash
dockercompose
version: ‘3.7’
services:
node:
build: node/
hostname: node
container_name: node
restart: always
ports:
- 9005:3000
volumes:
- ${USERDIR}/node:/home/app
I have a .env file created for the ${USERDIR} pointing to /srv/dev-disk-by-label-media/server/config/LEMP