-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
122 lines (116 loc) · 2.7 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
111
112
113
114
115
116
117
118
119
120
121
122
version: "3.6"
volumes:
redis_store:
driver: local
postgres_data:
driver: local
services:
web:
build:
context: ./
dockerfile: Dockerfile.dev
network: host
args:
USERNAME: vscode
image: kodoverdikto:latest
user: vscode
restart: on-failure:5
healthcheck:
test: ps aux | grep 'rails'
interval: 10s
timeout: 5s
retries: 5
security_opt:
- no-new-privileges
links:
- redis
- mailcatcher
- postgres
depends_on:
- redis
- mailcatcher
- postgres
volumes:
- .:/kodoverdikto:cached
- ./docker/bundle:/usr/local/bundle
ports:
- 80:80
stdin_open: true
tty: true
env_file:
- .env
redis:
image: redis:latest
restart: on-failure:5
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 1s
retries: 300
security_opt:
- no-new-privileges
volumes:
- redis_store:/data
sidekiq:
build:
context: ./
dockerfile: Dockerfile.dev
network: host
args:
USERNAME: vscode
image: kodoverdikto:latest
user: vscode
restart: on-failure:5
healthcheck:
test: ps aux | grep '[s]idekiq'
interval: 1s
timeout: 1s
retries: 300
security_opt:
- no-new-privileges
command: /kodoverdikto/scripts/entrypoints/sidekiq-start.sh
stdin_open: true
tty: true
env_file:
- .env
depends_on:
- redis
- postgres
volumes:
- .:/kodoverdikto:cached
- ./docker/bundle:/usr/local/bundle
postgres:
image: postgres:14
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10m
volumes:
- postgres_data:/var/lib/postgresql/data
- ./.devcontainer/db-entrypoint/1-create-user-and-database.sh:/docker-entrypoint-initdb.d/1-create-user-and-database.sh
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
DATABASE_DB: "${DB_NAME:-kodoverdikto}"
DATABASE_USER: "${DB_USER:-kodoverdikto}"
DATABASE_PASSWORD: "${DB_PSWD:-SecretPassword}"
TEST_DATABASE_DB: "${TEST_DB_NAME:-kodoverdikto_test}"
TEST_DATABASE_USER: "${TEST_DB_USER:-kodoverdikto_test}"
TEST_DATABASE_PASSWORD: "${TEST_DB_PSWD:-SecretPassword}"
DATABASE_RESTORE_JOBS: "${DB_JOBS:-8}"
ports:
- 5460:5432
mailcatcher:
image: schickling/mailcatcher
restart: unless-stopped
healthcheck:
test: ps aux | grep 'mailcatcher'
interval: 10s
timeout: 5s
retries: 5
ports:
- 1080:1080