This repository was archived by the owner on Sep 9, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
103 lines (98 loc) · 2.9 KB
/
Copy pathdocker-compose.yml
File metadata and controls
103 lines (98 loc) · 2.9 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
services:
next-db:
image: mongo:latest
container_name: next-db
ports:
- 27017:27017
volumes:
- ./scripts/docker/mongo/initdb.d:/docker-entrypoint-initdb.d:ro
- next-db-data:/data/db/
healthcheck:
test: ['CMD', 'mongosh', '--eval', "db.adminCommand('ping')"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
networks:
- next-network
next-redis:
image: redis:latest
container_name: next-redis
ports:
- 6379:6379
environment:
REDIS_USER: default
REDIS_PORT: 6379
REDIS_PASSWORD: qj6wGxXINcQyWXdN
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 5s
retries: 10
start_period: 5s
networks:
- next-network
localstack:
image: localstack/localstack:latest
container_name: localstack
ports:
- '4567:4566' # LocalStack gateway
- '4572:4571' # Alternative API gateway
environment:
SERVICES: 's3,lambda,dynamodb,sqs,sns,ses'
AWS_ACCESS_KEY_ID: 'AWS_ACCESS_KEY_ID_LOCALSTACK'
AWS_SECRET_ACCESS_KEY: 'AWS_SECRET_ACCESS_KEY_LOCALSTACK'
DEBUG: '1'
volumes:
- './scripts/docker/localstack:/var/lib/localstack'
- './scripts/init-localstack.sh:/etc/localstack/init/ready.d/init.sh'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:4566/_localstack/health']
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
networks:
- next-network
core:
container_name: next-core
build:
context: .
dockerfile: Dockerfile
target: dev
ports:
- '5000:5000'
env_file:
- ./apps/core/.env.dev
environment:
# Docker network overrides — service hostnames instead of localhost
- MONGODB_CONNECTION_URL=mongodb://next-db:27017/ufabc-matricula
- REDIS_CONNECTION_URL=redis://default:qj6wGxXINcQyWXdN@next-redis:6379
- LOCALSTACK_ENDPOINT=http://localstack:4566
volumes:
- ./apps/core/src:/workspace/apps/core/src:ro
- ./packages/common/src:/workspace/packages/common/src:ro
- ./packages/common/dist:/workspace/packages/common/dist:ro
- ./packages/db/src:/workspace/packages/db/src:ro
- ./packages/db/dist:/workspace/packages/db/dist:ro
- ./packages/queues/src:/workspace/packages/queues/src:ro
- ./packages/queues/dist:/workspace/packages/queues/dist:ro
- ./packages/testing/src:/workspace/packages/testing/src:ro
- ./packages/testing/dist:/workspace/packages/testing/dist:ro
- ./packages/tsconfig:/workspace/packages/tsconfig:ro
depends_on:
next-db:
condition: service_healthy
next-redis:
condition: service_healthy
localstack:
condition: service_healthy
networks:
- next-network
networks:
next-network:
driver: bridge
volumes:
next-db-data:
driver: local
name: next-mongo