Dockerfile, Error handling, comments, docker-compose (#2)

This commit is contained in:
dailypush
2023-03-30 11:53:31 -04:00
committed by GitHub
parent 4488a9db70
commit 3c83c64f1a
9 changed files with 214 additions and 60 deletions

36
docker-compose.yml Normal file
View File

@@ -0,0 +1,36 @@
version: "3.9"
services:
ping-server:
build: .
image: ping-server
ports:
- "3001:3001"
depends_on:
- redis
networks:
- app_network
environment:
REDIS_URL: "redis://redis:6379" # Define the Redis URL using the hostname of the Redis service
volumes:
- type: bind
source: ./config.example.yml
target: /app/config.yml
read_only: true
redis:
image: "redis:latest"
command: ["redis-server", "--appendonly", "yes"]
ports:
- "6379:6379"
networks:
- app_network
volumes:
- redis_data:/data
networks:
app_network:
driver: bridge
volumes:
redis_data: