-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
70 lines (68 loc) · 1.44 KB
/
docker-compose.yml
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
version: '3.8'
services:
backend:
build:
context: fastapi_backend
environment:
- OPENAPI_OUTPUT_FILE=./shared-data/openapi.json
ports:
- "8000:8000"
networks:
- my_network
volumes:
- ./fastapi_backend:/app
- ./local-shared-data:/app/shared-data
depends_on:
- db
db:
image: postgres:17
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: mydatabase
ports:
- "5432:5432"
networks:
- my_network
volumes:
- postgres_data:/var/lib/postgresql/data
db_test:
image: postgres:17
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: testdatabase
ports:
- "5433:5432"
networks:
- my_network
restart: always
frontend:
build:
context: ./nextjs-frontend
user: node
ports:
- "3000:3000"
networks:
- my_network
environment:
NODE_ENV: development
API_BASE_URL: http://backend:8000
OPENAPI_OUTPUT_FILE: ./shared-data/openapi.json
volumes:
- ./nextjs-frontend:/app
- nextjs-node-modules:/app/node_modules
- ./local-shared-data:/app/shared-data
mailhog:
image: mailhog/mailhog
ports:
- "1025:1025" # SMTP server
- "8025:8025" # Web UI
networks:
- my_network
volumes:
postgres_data:
nextjs-node-modules:
networks:
my_network:
driver: bridge