-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose-dev-m1.yaml
100 lines (95 loc) · 2.42 KB
/
docker-compose-dev-m1.yaml
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
# Due to incompatibility of flutter image with M1 processors,
# this configuration file excludes flutter container with documentation.
version: '3.9'
services:
mongodb:
image: mongo:5.0.0
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo mongo:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 40s
volumes:
- ./private/data/mongodb:/data/db
ports:
- "27017:27017"
redis:
image: redis:6.2.4-alpine
ports:
- "6379:6379"
volumes:
- ./private/data/redis:/data
command: redis-server --appendonly yes
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 1s
timeout: 3s
retries: 30
server:
build:
context: server
environment:
GIN_MODE: debug
ports:
- '8081:8081'
volumes:
- ./server:/server
server_docs:
build:
context: server/docs
ports:
- '8082:8082'
swagger-ui:
image: docker.io/swaggerapi/swagger-ui
environment:
- URL=http://localhost:8090/swagger.json
- SWAGGER_JSON=/swagger.json
ports:
- "8090:8080"
volumes:
- ./docs/swagger-api-docs/swagger-api-docs.yaml:/swagger.json
# Comment out prometheus and traefik containers since, those
# are not valid yet, but may be easily fixable for someone familiar
# with it and willing to contribute.
# prometheus:
# image: prom/prometheus
# ports:
# - "9090:9090"
# volumes:
# - type: bind
# source: ./server/prometheus-conf/prometheus.yml
# target: /etc/prometheus/prometheus.yml
# read_only: true
# go-prometheus:
# build:
# context: server/prometheus-microservice
# ports:
# - "9091:9091"
# volumes:
# - ./server/prometheus-microservice:/server/prometheus
# reverse-proxy:
# image: traefik:v2.4
# command:
# - "--api.insecure=true"
# - "--providers.docker"
# - "--api.dashboard=true"
# - "--configFile=$PWD/traefik.yml"
# ports:
# - target: 80
# published: 80
# protocol: "tcp"
# mode: "host"
# - target: 8080
# published: 8080
# protocol: "tcp"
# mode: "host"
# volumes:
# - type: bind
# source: /var/run/docker.sock
# target: /var/run/docker.sock
# read_only: true