53 lines
1.0 KiB
YAML
53 lines
1.0 KiB
YAML
version: '3.1'
|
|
|
|
services:
|
|
api:
|
|
build: .
|
|
restart: always
|
|
container_name: api
|
|
environment:
|
|
HTTP_PORT: 3010
|
|
# WS_PORT: 3020
|
|
DB_HOST: mongo
|
|
DB_PORT: 27017
|
|
DB_NAME: radio-rolnik
|
|
DB_USER: root
|
|
DB_PASS: supersecurepassword123
|
|
CACHE_HOST: redis
|
|
CACHE_PORT: 6379
|
|
ports:
|
|
- 3010:3010
|
|
- 3020:3020
|
|
depends_on:
|
|
- mongo
|
|
links:
|
|
- mongo
|
|
mongo:
|
|
image: mongo:5.0
|
|
container_name: mongo
|
|
restart: always
|
|
environment:
|
|
MONGO_INITDB_ROOT_USERNAME: root
|
|
MONGO_INITDB_ROOT_PASSWORD: supersecurepassword123
|
|
volumes:
|
|
- ./database:/data/db
|
|
ports:
|
|
- 27017:27017
|
|
command: --quiet
|
|
redis:
|
|
image: redis:6.2-alpine
|
|
container_name: redis
|
|
restart: always
|
|
environment:
|
|
ALLOW_EMPTY_PASSWORD: 'yes'
|
|
ports:
|
|
- 6379:6379
|
|
nginx:
|
|
image: nginx:1.21-alpine
|
|
container_name: nginx
|
|
restart: always
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf
|
|
ports:
|
|
- 80:80
|