-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (73 loc) · 1.96 KB
/
docker-compose.yml
File metadata and controls
77 lines (73 loc) · 1.96 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
version: "3.7"
services:
db:
image: postgres:14
command: postgres -c 'max_connections=200' -c 'shared_buffers=1GB' -c 'effective_cache_size=3GB' -c 'maintenance_work_mem=256MB' -c 'checkpoint_completion_target=0.9' -c 'wal_buffers=16MB' -c 'default_statistics_target=100' -c 'random_page_cost=4' -c 'effective_io_concurrency=2' -c 'work_mem=2621kB' -c 'min_wal_size=1GB' -c 'max_wal_size=4GB' -c 'idle_in_transaction_session_timeout=5min' -c 'statement_timeout=5min'
tty: true
shm_size: 128m
volumes:
- app-db-data:/var/lib/postgresql/data/pgdata
- type: tmpfs
target: /dev/shm
tmpfs:
size: 200m
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST_AUTH_METHOD=trust
build:
context: ./db
ports:
- "5433:5432"
networks:
dev-network:
ipv4_address: 172.29.0.7
backend:
image: "${DOCKER_IMAGE_BACKEND}:${TAG-latest}"
ports:
- "8000:80"
environment:
- SERVER_NAME=${DOMAIN}
- SERVER_HOST=http://${DOMAIN}
- TAG=${TAG}
volumes:
- ./api/app:/app
env_file:
- .env
build:
context: ./api
args:
INSTALL_DEV: ${INSTALL_DEV-true}
command: /start-reload.sh
networks:
dev-network:
ipv4_address: 172.29.0.4
frontend:
image: "${DOCKER_IMAGE_FRONTEND}:${TAG-latest}"
ports:
- "8080:8080"
volumes:
- ./spa:/app/
env_file:
- .env
build:
context: ./spa
args:
FRONTEND_ENV: ${FRONTEND_ENV}
environment:
- NODE_ENV=development
command: npm run serve # -- --public 0.0.0.0:8080
networks:
dev-network:
ipv4_address: 172.29.0.5
volumes:
app-db-data:
networks:
dev-network:
driver: bridge
ipam:
config:
- subnet: 172.29.0.2/16
gateway: 172.29.0.1