This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
98 lines (93 loc) · 2.79 KB
/
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
# Docker compose allows to run Docker containers locally.
# There are many ways to configure a source image for a container in a Docker compose file.
# The below, considers three options:
# OPTION 1: Building Docker images on the fly
# `build` block must be uncommented and `image` should be commented out
# e.g.
# build:
# context: .
# dockerfile: Dockerfile.response
# OPTION 2: Using locally built Docker images
# `build` block must be commented out and `image` should point to a local image name/tag
# e.g.
# image: response
# OPTION 3: Using images from a remote repository
# `build block must be commented out and `image` should point to a remote image name/tag
# e.g.
# image: ${ECR_ACCOUNT_NUMBER}.dkr.ecr.eu-west-2.amazonaws.com/modernisation-platform/incident-management-dev-ecr:response_latest
# NOTE: $ECR_ACCOUNT_NUMBER must be set prior running this docker compose config using remote source
version: "3"
services:
response:
build:
context: .
dockerfile: Dockerfile.response
# image: response
# image: ${ECR_ACCOUNT_NUMBER}.dkr.ecr.eu-west-2.amazonaws.com/modernisation-platform/incident-management-dev-ecr:response_latest
container_name: response
entrypoint: bash
command: /app/startup.sh --watch
expose:
- 8000
depends_on:
- db
env_file: .env
volumes:
- ./:/app
- ../:/response
- pypd:/app/pypd
stdin_open: true
tty: true
restart: always
nginx:
build:
context: .
dockerfile: Dockerfile.nginx
# image: response-nginx
# image: ${ECR_ACCOUNT_NUMBER}.dkr.ecr.eu-west-2.amazonaws.com/modernisation-platform/incident-management-dev-ecr:response-nginx_latest
container_name: response-nginx
environment:
APP_HOST: response
APP_PORT: 8000
volumes:
- ./nginx/webpack/dist:/app/opgincidentresponse/static
ports:
- 80:80
depends_on:
- response
cron:
build:
context: .
dockerfile: Dockerfile.cron
# image: cron
# image: ${ECR_ACCOUNT_NUMBER}.dkr.ecr.eu-west-2.amazonaws.com/modernisation-platform/incident-management-dev-ecr:cron_latest
container_name: cron
depends_on:
- response
tty: true
db:
image: "postgres:11.2"
container_name: postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data/
ngrok:
build:
context: .
args:
NGROK_TOKEN: ${NGROK_TOKEN}
dockerfile: Dockerfile.ngrok
# image: ngrok
# image: ${ECR_ACCOUNT_NUMBER}.dkr.ecr.eu-west-2.amazonaws.com/modernisation-platform/incident-management-dev-ecr:ngrok_latest
container_name: ngrok
environment:
TARGET_HOST: "response"
TARGET_PORT: 8000
ports:
- "4040:4040"
depends_on:
- response
volumes:
postgres_data:
pypd: