-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
84 lines (80 loc) · 1.97 KB
/
docker-compose.dev.yaml
File metadata and controls
84 lines (80 loc) · 1.97 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
services:
api:
build:
context: ./api/
dockerfile: Dockerfile.dev
container_name: mars-api
hostname: mars-api
restart: unless-stopped
environment:
DATABASE_HOST: mars-database
DATABASE_PORT: 5432
DATABASE_USER: mars
DATABASE_PASSWORD: secure-password
DATABASE_NAME: mars
ADMIN_EMAIL: admin@example.com
ADMIN_PASSWORD: Passw0rds!!!
env_file: .env.backend
depends_on:
database:
condition: service_healthy
healthcheck:
test:
["CMD-SHELL", "wget -qO- http://127.0.0.1:8080/api/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./api/:/app
- ./dev/go-modules:/go/pkg/mod
stdin_open: true
tty: true
database:
image: postgres:18
container_name: mars-database
hostname: mars-database
environment:
POSTGRES_PASSWORD: secure-password
POSTGRES_USER: mars
POSTGRES_DB: mars
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 10s
retries: 5
volumes:
- ./dev/postgres:/var/lib/postgresql
frontend:
container_name: mars-frontend
hostname: mars-frontend
restart: unless-stopped
build:
context: ./frontend
dockerfile: Dockerfile.dev
environment:
PUBLIC_API_URL: http://mars-api:8080
volumes:
- ./frontend:/app
- /app/node_modules
swagger-ui:
image: swaggerapi/swagger-ui:latest
container_name: mars-docs
hostname: mars-docs
environment:
BASE_URL: /docs
URL: /api/openapi.yaml
DEEP_LINKING: true
nginx:
image: nginx:alpine
container_name: mars-nginx
hostname: mars-nginx
restart: unless-stopped
depends_on:
api:
condition: service_healthy
swagger-ui:
condition: service_started
ports:
- "8080:80"
volumes:
- ./fileserver.conf:/etc/nginx/conf.d/default.conf:ro