add Docker
This commit is contained in:
34
docker-compose.yml
Executable file
34
docker-compose.yml
Executable file
@@ -0,0 +1,34 @@
|
||||
# To execute this docker-compose yml file use docker-compose -f <file_name> up
|
||||
# Add the "-d" flag at the end for detached execution
|
||||
version: '3.7'
|
||||
services:
|
||||
|
||||
elasticsearch:
|
||||
container_name: elasticsearch_${NAME}
|
||||
image: elasticsearch:6.7.1
|
||||
ports:
|
||||
- ${ELASTIC_REST}:9200
|
||||
- ${ELASTIC_NODES}:9300
|
||||
|
||||
# Database
|
||||
db:
|
||||
container_name: postgresql_${NAME}
|
||||
build:
|
||||
context: docker/postgresql
|
||||
restart: always
|
||||
ports:
|
||||
- ${POSTGRESQL_PORT}:5432
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${DB_NAME}
|
||||
POSTGRES_USER: ${DB_USER}
|
||||
POSTGRES_DB: ${DB_PWD}
|
||||
volumes:
|
||||
- ./var/log/postgresql:/var/log/postgresql:rw
|
||||
- ./var/postgresql/data:/var/lib/postgresql/data:rw
|
||||
depends_on:
|
||||
- elasticsearch
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://elasticsearch:9200/"]
|
||||
interval: 3s
|
||||
timeout: 2s
|
||||
retries: 20
|
||||
Reference in New Issue
Block a user