-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
140 lines (128 loc) · 3.65 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
version: '3.6'
services:
server:
image: mojiz/scootin-api-server:latest
container_name: scootin-api-server
build:
context: ./server
# target: test # development | test | production (default)
depends_on:
- postgres
ports:
- 8080:8080
- 2345:2345
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
volumes:
- ./server:/root/app
- ./server:/go/src/app
networks:
- scootin
environment:
SERVING_ADDR: ${SERVING_ADDR:-:8080}
STATIC_API_KEY: ${STATIC_API_KEY}
REDIS_USER: ${REDIS_USER:-root}
REDIS_PASSWORD: ${REDIS_PASSWORD:-password}
REDIS_HOST: ${REDIS_HOST:-redis}
REDIS_PORT: ${REDIS_PORT:-6379}
REDIS_DB: ${REDIS_DB:-0}
POSTGRES_DB: ${POSTGRES_DB:-defaultdb}
POSTGRES_USER: ${POSTGRES_USER:-root}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
POSTGRES_HOST: ${POSTGRES_HOST:-postgres}
healthcheck:
test: curl --fail http://localhost:8080/ || exit 1
interval: 30s
retries: 10 # Will try for 5 minutes
restart: always
security_opt:
- "seccomp:unconfined"
# entrypoint: "/root/app/app"
#----------------#
client:
image: mojiz/scootin-dummy-client:latest
container_name: scootin-dummy-client
build:
context: ./client
# target: development # development | test | production (default)
depends_on:
- server
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
volumes:
- ./client:/go/src/app
networks:
- scootin
environment:
SCOOTIN_API_PATH: ${SCOOTIN_API_PATH:-http://server:8080/}
STATIC_API_KEY: ${STATIC_API_KEY}
NUM_OF_CLIENTS: ${NUM_OF_CLIENTS:-3}
restart: always
security_opt:
- "seccomp:unconfined"
# entrypoint: "/root/app/app"
#----------------#
# redis:
# image: "redis:alpine"
# ports:
# - "${REDIS_PORT:-6379}:6379"
# volumes:
# - ./data/redis-data:/var/lib/redis
# - ./data/redis.conf:/usr/local/etc/redis/redis.conf
# networks:
# - scootin
# environment:
# - REDIS_REPLICATION_MODE=master
# command: redis-server --requirepass ${REDIS_PASSWORD:-password}
#----------------#
postgres:
container_name: postgres
image: postgres:latest
environment:
POSTGRES_DB: ${POSTGRES_DB:-defaultdb}
POSTGRES_USER: ${POSTGRES_USER:-root}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
POSTGRES_HOST: ${POSTGRES_HOST:-postgres}
volumes:
- ./data/postgres-data:/var/lib/postgresql/data
networks:
- scootin
ports:
- ${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432}
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "root" ]
timeout: 45s
interval: 10s
retries: 10
restart: always
#----------------#
# pgadmin:
# container_name: pgadmin
# image: dpage/pgadmin4
# depends_on:
# - postgres
# environment:
# PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
# PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
# PGADMIN_CONFIG_SERVER_MODE: 'False'
# volumes:
# - ./pgadmin:/root/.pgadmin
# ports:
# - "${PGADMIN_PORT:-5050}:80"
# networks:
# - scootin
# restart: unless-stopped
#----------------#
# volumes:
# postgres-storage:
networks:
scootin:
driver: bridge