-
Notifications
You must be signed in to change notification settings - Fork 147
Description
I am not able to setup my backend with ngnix.
I am using the same commands in docker-comppose.yml and mysite.template as shown in video
docker-compose.yml
version: '3'
services:
redis:
image: redis
networks:
- webnet
db:
image: postgres
volumes:
- ./pgdata:/var/lib/postgresql/data
networks:
- webnet
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: slack
ports:
- '3030:5432'
web:
image: slack-clone-server
networks:
- webnet
environment:
DB_HOST: db
REDIS_HOST: redis
depends_on:
- db
- redis
command: ['node', 'app.js']
nginx:
image: nginx
volumes:
- ./mysite.template:/etc/nginx/conf.d/mysite.template
ports:
- '8081:80'
networks:
- webnet
depends_on:
- web
command: /bin/bash -c "envsubst < /etc/nginx/conf.d/mysite.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
networks:
webnet:
AND mysite.template
server {
location / {
proxy_pass http://web:8081;
}
}
I am getting ERROR : cat: /etc/nginx/conf.d/mysite.template: Is a directory
server_nginx_1 exited with code 1
Please help me anyone