-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
116 lines (109 loc) · 3.61 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
version: '3'
services:
postgres:
container_name: postgres
image: postgres:alpine
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGDATA: /data/postgres
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- postgres:/data/postgres
expose:
- 5432
restart: unless-stopped # Change for 'always' in production environment
# Use this ONLY in staging environment
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: admin
volumes:
- ./servers.json:/pgadmin4/servers.json
- pgadmin:/root/.pgadmin
depends_on:
- postgres
links:
- postgres:postgres
ports:
- "5433:80"
restart: unless-stopped # Change for 'always' in production environment
nginx-proxy:
container_name: nginx-proxy
image: jwilder/nginx-proxy
environment:
DEFAULT_HOST: localhost
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- certs:/etc/nginx/certs:ro
- vhostd:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
ports:
- "80:80"
# - "443:443" # Enable in production environment
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy
# Enable in production environment
# letsencrypt:
# container_name: letsencrypt
# image: jrcs/letsencrypt-nginx-proxy-companion
# environment:
# NGINX_PROXY_CONTAINER: nginx-proxy
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock:ro
# - certs:/etc/nginx/certs:rw
# - vhostd:/etc/nginx/vhost.d
# - html:/usr/share/nginx/html
# depends_on:
# - nginx-proxy
# restart: always
locust-master:
container_name: locust-master
image: locustio/locust
ports:
- "8089:8089"
volumes:
- ./locustfile.py:/mnt/locust/locustfile.py
command: -f /mnt/locust/locustfile.py --master --host http://nginx-proxy --users 2500 --spawn-rate 25
locust-worker:
# container_name: locust-worker # Scalable containers cannot have custom names
image: locustio/locust
volumes:
- ./locustfile.py:/mnt/locust/locustfile.py
command: -f /mnt/locust/locustfile.py --worker --master-host locust-master
deploy:
replicas: 4
shortr_go-echo:
build:
context: ./
dockerfile: ./go/echo/Dockerfile
container_name: shortr_go-echo
image: shortr_go-echo:latest
environment:
APP_PORT: 80
APP_SSL_ENABLED: 'false' # Change to 'true' in production environment
DATABASE_HOST: postgres
DATABASE_PORT: 5432
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
DATABASE_NAME: postgres
DATABASE_SSLMODE: disable # Change to 'require' in production environment
VIRTUAL_HOST: localhost
LETSENCRYPT_HOST: localhost
LETSENCRYPT_EMAIL: somebody@localhost.com
depends_on:
- postgres
links:
- postgres:postgres
expose:
- 80
restart: unless-stopped # Change for 'always' in production environment
volumes:
postgres:
pgadmin:
certs:
vhostd:
html: