-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
96 lines (88 loc) · 2.66 KB
/
docker-compose.yml
File metadata and controls
96 lines (88 loc) · 2.66 KB
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
#
# This docker compose file is for DEVELOPMENT and TESTING purposes ONLY it is not suitable for production use
# It does however let you run the app in production mode if you want to test that
#
# If you need to leave the container running for example to debug something you can use the following command to keep it running
# command: ["tail", "-f", "/dev/null"]
services:
# Outpost app
outpost:
image: "outpost:development"
container_name: outpost
# use if you just want to keep the container running
# command: ["tail", "-f", "/dev/null"]
# uncomment for 'prod' like env locally
# command: ["bin/bundle", "exec", "puma", "-C", "config/puma.rb"]
init: true
depends_on:
- postgres
- mongo
# platform: linux/amd64 # or linux/arm64, or omit for auto-detect
build:
context: .
ports:
- 3000:3000
volumes:
- ./:/app:cached
- /app/node_modules
- /app/tmp
environment:
OFSTED_FEED_API_ENDPOINT: ${OFSTED_FEED_API_ENDPOINT:-http://ofsted-stub:8000}
SHOW_ENV_BANNER: ${SHOW_ENV_BANNER:-outpost docker development}
DB_URI: mongodb://${MONGO_INITDB_USERNAME:-outpost}:${MONGO_INITDB_PASSWORD:-password}@mongo/${MONGO_INITDB_DATABASE:-outpost_api_development}
DATABASE_URL: ${DATABASE_URL:-postgresql://outpost:password@postgres:5432/outpost?}
# uncomment if using selenium container below
# REMOTE_CHROME: true
# uncomment for 'prod' like env locally
# NODE_ENV: production
# RAILS_ENV: production
# SECRET_KEY_BASE: dummy
networks:
- external_network
- internal_network
outpost-api-service:
extends:
file: ./.docker/services/outpost-api-service/outpost-api-service.yml
service: outpost-api-service
depends_on:
- mongo
# Ofsted stub
ofsted-stub:
build:
context: ./.docker/services/ofsted-stub
dockerfile: Dockerfile
ports:
- 8000:8000
container_name: ofsted-stub
networks:
- internal_network
- external_network
# Databases
postgres:
extends:
file: ./.docker/services/postgres/postgres.yml
service: postgres
networks:
- external_network
mongo:
extends:
file: ./.docker/services/mongo/mongo.yml
service: mongo
networks:
- external_network
# if you need remote chrome instance for tests see spec/support/capybara.rb
# selenium:
# image: selenium/standalone-chromium:latest
# container_name: selenium
# ports:
# - 4444:4444
# networks:
# - external_network
# shm_size: 2gb
volumes:
mongo-volume:
postgres-volume:
networks:
external_network:
internal_network:
internal: true