-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
45 lines (39 loc) · 1.29 KB
/
docker-compose.yaml
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
#--------------------------------------------------------------------------
# ! The Docker Compose file is configured for local environments.
# ! Do not deploy this Docker Compose file in production environments.
#--------------------------------------------------------------------------
# Docker compose version https://docs.docker.com/compose/compose-file
version: "3.9"
# Sets the project name.
name: localhost-databases
# The Docker services.
services:
# The couchDB database container.
couchdb:
# https://hub.docker.com/_/couchdb
image: couchdb:latest
container_name: "${DB_CONTAINER_NAME:-couchdb}"
command: ["bash", "/opt/couchdb/set-port.sh"]
environment:
COUCHDB_USER: "${DB_USERNAME}"
COUCHDB_PASSWORD: "${DB_PASSWORD}"
PORT: "${PORT:-5984}"
networks:
- local
# Map the database container exposed port to the host port.
ports:
- ${PORT:-5984}:5984
volumes:
- couchdb_data:/opt/couchdb/data
- ./create-databases.sh:/opt/couchdb/create-databases.sh
- ./set-port.sh:/opt/couchdb/set-port.sh
# The Docker networks.
networks:
local:
driver: "bridge"
name: ${NETWORK_NAME:-local_dbs_network}
# The Docker volumes.
volumes:
couchdb_data:
driver: "local"
name: "${DB_VOLUME_DATA_NAME:-couchdb_data}"