-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
25 lines (22 loc) · 1022 Bytes
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
version: '3.8'
services:
chat:
build: .
restart: unless-stopped
expose: # note : this does not open port on host machine, it just exposes the port in docker compose's network. Use "ports" if you need to map host's port to container.
- 8080
chat-nginx:
build: ./nginx
restart: unless-stopped
expose: # samesies
- 80
depends_on:
- chat
# Below is the configuration for using an existing docker network instead of the letting docker-compose create one by default. I use an external network to handle routing and deployment of multiple docker compose stacks on same server using traefik (https://github.com/traefik/traefik).
# While running this docke-compose, you have 2 options
# 1. Comment out the below 4 lines, and run this stack as usual, with `docker-compose up`
# 2. Create a docker network with name `traefik` using command `docker network create traefik`, and move onto better things in your life.
networks:
default:
name: traefik
external: true