-
Notifications
You must be signed in to change notification settings - Fork 21
/
docker-compose.yml
110 lines (104 loc) · 2.55 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
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
104
105
106
107
108
109
110
services:
app:
container_name: gost-app
build:
context: .
dockerfile: ./docker/Dockerfile
target: api
volumes:
- ./:/app
- type: volume
source: node_modules
target: /app/node_modules
networks:
- app
- postgres
ports:
- 3000:3000
- 9229:9229
command:
- "yarn"
- "debug:server"
depends_on:
postgres:
condition: service_healthy
env_file:
- ./packages/server/.env
localstack:
container_name: "gost-localstack_main"
image: localstack/localstack
ports:
- 4566:4566 # LocalStack Gateway
- 4510-4559:4510-4559 # external services port range
environment:
- DEBUG=${DEBUG-}
- DOCKER_HOST=unix:///var/run/docker.sock
- AWS_DEFAULT_REGION=${AWS_REGION:-us-west-2}
networks:
- app
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
- "./localstack/entrypoint/init-aws.sh:/etc/localstack/init/ready.d/init-aws.sh"
frontend:
container_name: gost-frontend
build:
context: .
dockerfile: ./docker/Dockerfile
target: client
volumes:
- ./:/app
- type: volume
source: node_modules
target: /app/node_modules
networks:
- app
ports:
- 8080:8080
environment:
- GOST_API_URL=http://app:3000/
env_file:
- ./packages/client/.env
postgres:
container_name: gost-postgres
hostname: postgres
image: 'bitnami/postgresql:14.4.0'
platform: linux/amd64
networks:
- postgres
environment:
- POSTGRESQL_PASSWORD=password123
- POSTGRESQL_DATABASE=usdr_grants
- POSTGRESQL_USER=postgres
ports:
- 5432:5432
volumes:
- ./docker/postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- ./docker/postgres/docker-entrypoint-preinitdb.d:/docker-entrypoint-preinitdb.d
# - ./docker/postgres/persistence:/bitnami/postgresql
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 10s
start_period: 30s
mailpit:
image: axllent/mailpit
container_name: gost-mailpit
restart: always
volumes:
- ./docker/mailpit:/data
networks:
- app
ports:
- 8025:8025
- 1025:1025
environment:
MP_MAX_MESSAGES: 5000
MP_DATA_FILE: /data/mailpit.db
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
networks:
app:
driver: bridge
postgres:
volumes:
node_modules: