-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
96 lines (90 loc) · 2.24 KB
/
docker-compose.dev.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
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
services:
db:
image: postgres:16-alpine
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: infisical
POSTGRES_USER: infisical
POSTGRES_DB: infisical
healthcheck:
test: ["CMD-SHELL", "pg_isready -U infisical"]
interval: 5s
timeout: 5s
retries: 5
db-migration:
container_name: db-migration
depends_on:
db:
condition: service_healthy
build:
context: ./server
dockerfile: Dockerfile.dev
env_file: .env
environment:
- DB_CONNECTION_URI=postgres://infisical:infisical@db/infisical?sslmode=disable
command: npm run migration:latest
volumes:
- ./server/src:/app/src
backend:
container_name: dev-api
build:
context: ./server
dockerfile: Dockerfile.dev
depends_on:
db:
condition: service_started
db-migration:
condition: service_completed_successfully
env_file:
- .env
ports:
- 8000:8000
environment:
- NODE_ENV=development
- DB_CONNECTION_URI=postgres://infisical:infisical@db/infisical?sslmode=disable
- TELEMETRY_ENABLED=false
volumes:
- ./server/src:/app/src
extra_hosts:
- "host.docker.internal:host-gateway"
frontend:
container_name: dev-frontend
restart: unless-stopped
depends_on:
- backend
build:
context: ./client
dockerfile: Dockerfile.dev
ports:
- 3000:3000
volumes:
- ./client/src:/app/src/ # mounted whole src to avoid missing reload on new files
- ./client/public:/app/public
env_file: .env
pgadmin:
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: pass
volumes:
- ./servers.json:/pgadmin4/servers.json
ports:
- 5050:80
depends_on:
- db
smtp-server:
container_name: dev-smtp-server
image: lytrax/mailhog:latest # https://github.com/mailhog/MailHog/issues/353#issuecomment-821137362
restart: always
logging:
driver: "none" # disable saving logs
ports:
- 1025:1025 # SMTP server
- 8025:8025 # Web UI
volumes:
postgres-data:
driver: local