🐳 Switched to the TS template with the correct docker-compose config

This commit is contained in:
2021-09-01 08:59:36 -07:00
parent 76722ab6a1
commit b71319f330
17 changed files with 3017 additions and 8359 deletions

58
docker-compose.yml Normal file
View File

@@ -0,0 +1,58 @@
version: "3.3"
services:
api:
build:
context: .
image: threetwo-library-service
env_file: docker-compose.env
environment:
SERVICES: api
PORT: 3000
depends_on:
- nats
labels:
- "traefik.enable=true"
- "traefik.http.routers.api-gw.rule=PathPrefix(`/`)"
- "traefik.http.services.api-gw.loadbalancer.server.port=3000"
networks:
- internal
greeter:
build:
context: .
image: threetwo-library-service
env_file: docker-compose.env
environment:
SERVICES: greeter
depends_on:
- nats
networks:
- internal
nats:
image: nats:2
networks:
- internal
traefik:
image: traefik:v2.1
command:
- "--api.insecure=true" # Don't do that in production!
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
ports:
- 3000:80
- 3001:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- internal
- default
networks:
internal:
volumes:
data: