-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcompose.yaml
More file actions
125 lines (125 loc) · 2.95 KB
/
compose.yaml
File metadata and controls
125 lines (125 loc) · 2.95 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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
services:
server:
build:
context: .
target: dev
dockerfile: Dockerfile.server
restart: always
environment:
DATABASE_URL: postgresql://postgres:asdfasdf@db:5432/postgres
TEST_DATABASE_URL: postgresql://postgres:asdfasdf@test_db:5432/postgres
JOB_FUNCTION_URL: http://job_worker:3000
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_ENDPOINT_URL_S3: http://localstack:4566
AWS_S3_FORCE_PATH_STYLE: "true"
volumes:
- ./:/app
- platform-node-modules:/app/node_modules
ports:
- 3000:3000
depends_on:
db:
condition: service_healthy
localstack:
condition: service_healthy
job_worker:
build:
context: .
target: dev
dockerfile: Dockerfile.job-worker
restart: always
environment:
DATABASE_URL: postgresql://postgres:asdfasdf@db:5432/postgres
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_ENDPOINT_URL_S3: http://localstack:4566
AWS_S3_FORCE_PATH_STYLE: "true"
EXPORT_PUBLIC_S3_ENDPOINT: http://localhost:4566
volumes:
- ./:/app
- job-worker-node-modules:/app/node_modules
ports:
- 9000:3000
depends_on:
db:
condition: service_healthy
localstack:
condition: service_healthy
env_file:
- path: .env
required: false
localstack:
image: localstack/localstack:4
environment:
- SERVICES=s3
- DEFAULT_REGION=us-east-1
- LS_LOG=warn
volumes:
- ./localstack/data:/var/lib/localstack
- ./localstack/init:/etc/localstack/init
ports:
- 4566:4566
healthcheck:
test: ["CMD", "bash", "-c", "awslocal s3 ls >/dev/null 2>&1"]
interval: 10s
timeout: 5s
retries: 5
db:
build:
dockerfile: db/Dockerfile
restart: always
shm_size: 128mb
user: postgres
volumes:
- db-data:/var/lib/postgresql/data
- ./db/scripts/docker-initdb.sh:/docker-entrypoint-initdb.d/docker-initdb.sh
- ./db:/db
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=asdfasdf
expose:
- 5432
ports:
- 5434:5432
healthcheck:
test: ["CMD", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
test_db:
image: postgres:14
restart: always
shm_size: 128mb
user: postgres
volumes:
- ./db:/db
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=asdfasdf
expose:
- 5432
ports:
- 5433:5432
healthcheck:
test: ["CMD", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
docs:
build:
context: .
dockerfile: docs/Dockerfile
restart: always
volumes:
- ./:/app
- docs-node-modules:/app/docs/node_modules
ports:
- 4000:3000
volumes:
db-data:
platform-node-modules:
job-worker-node-modules:
docs-node-modules: