diff --git a/.gitignore b/.gitignore index 7b3c05c..040d4e9 100644 --- a/.gitignore +++ b/.gitignore @@ -100,6 +100,7 @@ test/databases/private.db # Config files config.json +docker/database.env # Mac files .DS_Store diff --git a/docker/database.env.example b/docker/database.env.example new file mode 100644 index 0000000..dba3119 --- /dev/null +++ b/docker/database.env.example @@ -0,0 +1,3 @@ +POSTGRES_USER=sponsorblock +POSTGRES_PASSWORD= +POSTGRES_DB=sponsorTimes \ No newline at end of file diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..224055a --- /dev/null +++ b/docker/docker-compose.yml @@ -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: \ No newline at end of file diff --git a/docker/redis/redis.conf b/docker/redis/redis.conf new file mode 100644 index 0000000..023731b --- /dev/null +++ b/docker/redis/redis.conf @@ -0,0 +1,2 @@ +maxmemory-policy allkeys-lru +maxmemory 1000mb \ No newline at end of file