forked from LandRegistry/common-dev-env
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-fragment.yml
29 lines (29 loc) · 1.08 KB
/
docker-compose-fragment.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
version: '2'
services:
# Notice how the service name, container name and repo directory (where the Dockerfile lives) all match.
backend-api:
container_name: backend-api
build: ./backend-api
restart: on-failure
ports:
# The application is running on port 8080 which other containers will use,
# we expose it here and map it to a unique port that it will be exposed on the host with.
# If you don't want it available to the host at all, leave this line out but ensure your
# Dockerfile EXPOSEs it for the other containers.
- "9998:8080"
volumes:
# Our convention is to always map the app files to /src within the container
- ./backend-api:/src
logging:
driver: syslog
options:
syslog-format: "rfc5424"
syslog-address: "tcp://localhost:25826"
tag: "{{.Name}}"
depends_on:
- logstash
# THE BELOW SECTION IS ONLY IF THE APP IS USING NGINX AS A COMMODITY
# Ensures the app is started before nginx so it can resolve the hostname and not error out
nginx:
depends_on:
- backend-api