-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
79 lines (72 loc) · 1.85 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
version: '3.5'
networks:
backend:
driver: bridge
services:
api:
image: cosmtrek/air
working_dir: /go/src/app
volumes:
- .:/go/src/app
ports:
- "${PORT}:8080"
environment:
- CASSANDRA_DB_HOST=${CASSANDRA_DB_HOST}
- CASSANDRA_USER=${CASSANDRA_USER}
- CASSANDRA_PASSWORD=${CASSANDRA_PASSWORD}
- CASSANDRA_MAX_RETRY_CONNECT=${CASSANDRA_MAX_RETRY_CONNECT}
- MEMCACHED_SERVER=${MEMCACHED_SERVER}
- REDIS_SERVER=${REDIS_SERVER}
- REDIS_PREFIX=${REDIS_PREFIX}
restart: on-failure
networks:
- backend
depends_on:
- cassandra
- redis
- memcached
cron:
image: cosmtrek/air
working_dir: /go/src/app
volumes:
- .:/go/src/app
environment:
- CASSANDRA_DB_HOST=${CASSANDRA_DB_HOST}
- CASSANDRA_USER=${CASSANDRA_USER}
- CASSANDRA_PASSWORD=${CASSANDRA_PASSWORD}
- CASSANDRA_MAX_RETRY_CONNECT=${CASSANDRA_MAX_RETRY_CONNECT}
- DATA_FILE_PATH=${DATA_FILE_PATH}
- CRON_SCHEDULE=${CRON_SCHEDULE}
- CRON_EXIT_ON_ERROR=${CRON_EXIT_ON_ERROR}
- MEMCACHED_SERVER=${MEMCACHED_SERVER}
- REDIS_SERVER=${REDIS_SERVER}
- REDIS_PREFIX=${REDIS_PREFIX}
restart: on-failure
networks:
- backend
depends_on:
- cassandra
- redis
- memcached
command: ["-c", ".cron.air.toml"]
cassandra:
image: bitnami/cassandra:latest
environment:
- CASSANDRA_USER=${CASSANDRA_USER}
- CASSANDRA_PASSWORD=${CASSANDRA_PASSWORD}
volumes:
- ${DATA_PATH_HOST}/cassandra:/var/lib/cassandra
networks:
- backend
memcached:
image: memcached:alpine
volumes:
- ${DATA_PATH_HOST}/memcached:/var/lib/memcached
networks:
- backend
redis:
image: redis:alpine
volumes:
- ${DATA_PATH_HOST}/redis:/data
networks:
- backend