-
Notifications
You must be signed in to change notification settings - Fork 15
/
docker-compose.yml
78 lines (72 loc) · 1.71 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
services:
db:
image: 'postgres:13.1-alpine'
container_name: vinifera_postgres
volumes:
- 'postgres:/var/lib/postgresql/data'
ports:
- '5431:5432'
expose:
- 5431
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
networks:
- postgres-connection
redis:
image: 'redis:6-alpine'
container_name: vinifera_redis
ports:
- '6378:6379'
expose:
- 6378
volumes:
- 'redis:/data'
networks:
- redis-connection
docker-host:
image: docker:dind
container_name: docker
privileged: yes
restart: unless-stopped
volumes:
- ${PWD}/.docker_certs/client:/certs/client
- ${PWD}/.docker_certs.d:/etc/docker/certs.d
networks:
docker-connection:
ipv4_address: 10.5.0.5
sidekiq:
container_name: vinifera_sidekiq
depends_on:
- 'db'
- 'redis'
- 'docker-host'
build: .
volumes:
- '.:/project'
- '/project/tmp'
- ${PWD}/.docker_certs/client:/app/.docker_certs/
env_file:
- '.docker_env'
environment:
DOCKER_CLIENT_CERT_PATH: '/app/.docker_certs/'
DOCKER_HOST: 'tcp://10.5.0.5:2376' # Due to TLS certificate requires host to be same as those in CA
REDIS_URL: 'redis://redis:6379/1'
SIDEKIQ_REDIS_URL: 'redis://redis:6379/2'
VINIFERA_DATABASE_HOST: 'db'
networks: # Replicate VPCs and isolate communication between containers
- docker-connection
- redis-connection
- postgres-connection
volumes:
redis:
postgres:
docker-host:
networks:
docker-connection:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16
gateway: 10.5.0.1
redis-connection:
postgres-connection: