Hi all,
I want to start a nodejs app inside of a traefik container with following setup:
Dockerfile for my t14 image:
#FROM traefik:v3.0
FROM traefik:v3.0
ENV NODE_ENV=production
# install apk
RUN apk update && apk --no-cache add curl && apk --no-cache add bash
#
# install node
RUN apk add --update nodejs npm
RUN node --version
RUN npm --version
# end
COPY ./app /app
WORKDIR /app
CMD npm start
docker-compose.yml:
version: '3'
services:
reverse-proxy:
image: t14
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "; bash -c 'npm start'"
ports:
- 80:80
- 443:443
# The Web UI (enabled by --api.insecure=true)
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.yml:/etc/traefik/traefik.yml
- ./ssl-certs:/ssl-certs
networks:
- traefik_web
But ive the problem that "bash -c 'npm start'" never gets executed. In other words my nodejs app never starts... Any hints / help regarding my problem?
Best regards