maps-service/compose.yaml

75 lines
1.5 KiB
YAML

version: '3.9'
networks:
maps-service-network:
driver: bridge
secrets:
netrc:
file: /home/quat/.netrc
services:
nats:
image: docker.io/nats:latest
container_name: nats
command: ["-js"]
networks:
- maps-service-network
ports:
- "4222:4222"
maps-service:
build:
secrets:
- netrc
context: .
dockerfile: Containerfile
container_name: maps-service
command: [
# debug
"--debug","serve",
# http service port
"--port","8081",
# postgres
"--pg-host","10.0.0.29",
"--pg-port","5432",
"--pg-db","maps",
"--pg-user","quat",
"--pg-password","happypostgresuser",
# other hosts
"--nats-host","nats:4222",
"--auth-rpc-host","localhost:8090"
]
depends_on:
- nats
networks:
- maps-service-network
ports:
- "8081:8081"
web:
build:
context: web
dockerfile: Containerfile
networks:
- maps-service-network
ports:
- "3000:3000"
validation:
build:
context: validation
dockerfile: Containerfile
container_name: validation
environment:
- RBXCOOKIE=RBXCOOKIE
- API_HOST=http://localhost:8081
- NATS_HOST=nats:4222
- DATA_HOST=http://localhost:9000
depends_on:
- nats
# note: this races the maps-service which creates a nats stream
# the validation will panic if the nats stream is not created
- maps-service
networks:
- maps-service-network