-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (57 loc) · 1.58 KB
/
docker-compose.yml
File metadata and controls
59 lines (57 loc) · 1.58 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
services:
db:
image: postgres:17
environment:
- POSTGRES_DB
- POSTGRES_PASSWORD
- POSTGRES_USER
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
ports:
- "5434:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
api:
build:
context: .
target: builder
image: editor-api:builder
depends_on:
db:
condition: service_healthy
volumes:
- .:/app
- bundle-data-v2:/usr/local/bundle
- node_modules:/app/node_modules
# This is here to avoid rails finding stale pid-files in tmp/pids and then
# thinking it is already running:
- type: tmpfs
target: /app/tmp/pids
# The cache should be on tmpfs too, to ensure it gets wiped between runs
- type: tmpfs
target: /app/tmp/cache
command: bash bin/docker-entrypoint.sh
# NB: The API runs on port 3009.
ports:
- "3009:3009"
stdin_open: true # For docker run --interactive, i.e. keep STDIN open even if not attached
tty: true # For docker run --tty, i.e. allocate a pseudo-TTY. Important to allow interactive byebug sessions
environment:
- POSTGRES_HOST
- POSTGRES_DB
- POSTGRES_PASSWORD
- POSTGRES_USER
extra_hosts:
- "host.docker.internal:host-gateway"
smee:
image: deltaprojects/smee-client
platform: linux/amd64
command: -u $SMEE_TUNNEL -t http://api:3009/github_webhooks
volumes:
postgres-data:
bundle-data-v2:
node_modules: