-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathdocker-compose.yml
102 lines (94 loc) · 2.52 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
services:
postgres:
# When you update PostgreSQL, make sure to upgrade the `postgresql-client` version
# in `Dockerfile` and `Dockerfile.development`. This ensures that `pg_dump` and
# `psql` versions stay in sync with the PostgreSQL version, reducing the risk of
# incompatibilities.
image: "citizenlabdotco/postgis-pgvector:latest"
# From https://www.postgresql.org/docs/current/non-durability.html
command: postgres -c fsync=off -c synchronous_commit=off -c full_page_writes=off
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- "postgres:/var/lib/postgresql/data"
web:
container_name: cl-back-web
depends_on:
- "postgres"
- "mailcatcher"
- "rabbitmq"
# - 'memcached'
build:
context: .
dockerfile: back/Dockerfile.development
ports:
- "4000:4000"
volumes:
- "./back:/cl2_back"
- bundle_path:/bundle
env_file:
- "env_files/back-safe.env"
- "env_files/back-secret.env"
environment:
- BUNDLE_PATH=/bundle
- BASE_DEV_URI
tty: true
stdin_open: true
que:
container_name: cl-que
depends_on:
- "postgres"
- "mailcatcher"
- "rabbitmq"
build:
context: .
dockerfile: back/Dockerfile.development
command: bundle exec que
volumes:
- "./back:/cl2_back"
- bundle_path:/bundle
env_file:
- "env_files/back-safe.env"
- "env_files/back-secret.env"
environment:
BUNDLE_PATH: /bundle
tty: true
stdin_open: true
rabbitmq:
container_name: cl-back-rabbit
image: "rabbitmq:3.8-management"
ports:
- "8088:15672"
volumes:
- "./back/rabbitmq_enabled_plugins:/etc/rabbitmq/enabled_plugins"
mailcatcher:
image: "schickling/mailcatcher"
ports:
- "1080:1080"
# Include this and uncomment :mem_cache_store in
# `config/environments/development.rb` if you want to enable caching in
# development
# memcached:
# image: memcached:alpine
# command: memcached -m 64
# Open API documentation - Only starts if you run docker compose --profile openapi up
openapi:
container_name: cl-open-api
image: swaggerapi/swagger-ui
ports:
- 8080:8080
volumes:
- ./back/doc/public_api:/usr/share/nginx/html/doc
environment:
URLS: "[{ url: 'doc/open_api.json', name: 'Public API'}]"
profiles:
- openapi
volumes:
postgres:
bundle_path:
networks:
default:
name: citizenlab