Add docker compose for deps

This commit is contained in:
Ajay Ramachandran 2021-03-01 19:21:27 -05:00
parent f358605f70
commit fa759ae7b2
4 changed files with 28 additions and 0 deletions

1
.gitignore vendored
View file

@ -100,6 +100,7 @@ test/databases/private.db
# Config files
config.json
docker/database.env
# Mac files
.DS_Store

View file

@ -0,0 +1,3 @@
POSTGRES_USER=sponsorblock
POSTGRES_PASSWORD=<choose-a-password>
POSTGRES_DB=sponsorTimes

22
docker/docker-compose.yml Normal file
View file

@ -0,0 +1,22 @@
version: '3'
services:
database:
container_name: database
image: postgres
env_file:
- database.env
volumes:
- database-data:/var/lib/postgresql/data
ports:
- 5432:5432
redis:
container_name: redis
image: redis
command: /usr/local/etc/redis/redis.conf
volumes:
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
ports:
- 32773:6379
volumes:
database-data:

2
docker/redis/redis.conf Normal file
View file

@ -0,0 +1,2 @@
maxmemory-policy allkeys-lru
maxmemory 1000mb