-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·76 lines (75 loc) · 1.73 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
version: '3.5'
services:
service-go:
build:
context: .
dockerfile: ./docker/service-go/Dockerfile
args:
- UID=${UID}
restart: always
ports:
- 8080:8080
networks:
- general-network
service-db:
image: postgres:11.3
restart: always
ports:
- ${POSTGRES_PORT}:5432
environment:
TZ: "Europe/Moscow"
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE}
volumes:
- postgres-sock:/var/lib/postgresql
networks:
- general-network
healthcheck:
test: pg_isready -q -d ${DB_DATABASE} -U ${DB_USERNAME}
timeout: 5s
rabbit:
restart: always
image: rabbitmq:3.8.2-management
ports:
- "15672:15672"
volumes:
- rabbitmq-data:/var/lib/rabbitmq
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
healthcheck:
test: rabbitmq-diagnostics -q check_port_connectivity && rabbitmq-diagnostics -q node_health_check
timeout: 10s
networks:
- general-network
cron:
platform: linux/amd64
build:
context: .
dockerfile: ./docker/cron/Dockerfile
target: base
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./docker/cron/config.json:/opt/crontab/config.json:rw
networks:
- general-network
redis:
restart: always
image: redis:3-alpine
volumes:
- redis-data:/data
healthcheck:
test: redis-cli PING
timeout: 3s
networks:
- general-network
volumes:
postgres-sock:
rabbitmq-data:
redis-data:
networks:
general-network:
name: general-network
attachable: true