-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
105 lines (98 loc) · 2.19 KB
/
docker-compose.yml
File metadata and controls
105 lines (98 loc) · 2.19 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
version: '3.3'
services:
db:
image: postgres:latest
container_name: postgres
ports:
- ${POSTGRES_PORT}:5432
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- file_manager:/var/lib/postgresql/data
networks:
- network1
minio:
image: minio/minio
container_name: minio
restart: always
ports:
- ${MINIO_PORT}:9000
environment:
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY_ID}
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_ACCESS_KEY}
volumes:
- file_manager:/data
- file_manager:/root/.minio
command: server /data
networks:
network1:
ipv4_address: ${MINIO_HOST}
configure-minio:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set minio http://${MINIO_HOST}:${MINIO_PORT} minioadmin minioadmin;
exit 0;
"
networks:
network1:
ipv4_address: ${MINIO_HOST_ALT}
redis:
image: redis:7.2
container_name: redis
ports:
- ${REDIS_PORT}:6379
volumes:
- file_manager:/data
networks:
- network1
app:
container_name: rails_server
image: rails_server:latest
build:
context: .
dockerfile: Dockerfile
command: rails server -b 0.0.0.0
volumes:
- .:/app
ports:
- ${APP_PORT}:3000
depends_on:
- db
- minio
- redis
environment:
RAILS_WEB_CONTAINER: true
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${POSTGRES_PORT}
REDIS_URL: redis://redis:${REDIS_PORT}/1
networks:
- network1
sidekiq:
container_name: rails_sidekiq
image: rails_sidekiq:latest
build:
context: .
dockerfile: Dockerfile.sidekiq
command: bundle exec sidekiq
volumes:
- .:/app
depends_on:
- db
- minio
- redis
- app
environment:
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${POSTGRES_PORT}
REDIS_URL: redis://redis:${REDIS_PORT}/1
networks:
- network1
volumes:
file_manager:
networks:
network1:
ipam:
config:
- subnet: ${CUSTOM_NETWORK_SUBNET}