Skip to content

Commit

Permalink
Docker optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
aldwin7894 committed Aug 18, 2022
1 parent 80a6501 commit 40d8e9d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
8 changes: 8 additions & 0 deletions config/redis.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
maxmemory 100mb
maxmemory-policy allkeys-lfu
maxmemory-samples 5
lfu-log-factor 10
lfu-decay-time 1
save 300 5
loglevel verbose
appendonly yes
17 changes: 10 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ version: "3.9"

services:
db:
image: postgres:latest
container_name: aldwin7894-pg
image: postgres:14-alpine
restart: always
environment:
- TZ
Expand All @@ -11,25 +12,27 @@ services:
ports:
- 5432:5432
volumes:
- "dbdata:/var/lib/postgresql/data"
- dbdata:/var/lib/postgresql/data
redis:
image: redis:latest
command: redis-server
container_name: aldwin7894-redis
image: redis:alpine
command: redis-server /usr/local/etc/redis/redis.conf
restart: always
environment:
- TZ
ports:
- "6379:6379"
- 6379:6379
volumes:
- 'redis:/data'
- redis:/data
- ./config/redis.conf:/usr/local/etc/redis/redis.conf
web:
build:
context: .
dockerfile: Dockerfile
args:
- "OCCSON_ACCESS_TOKEN_ARG=${OCCSON_ACCESS_TOKEN}"
- "OCCSON_PASSPHRASE_ARG=${OCCSON_PASSPHRASE}"
container_name: aldwin7894
container_name: aldwin7894-app
image: aldwin7894/aldwin7894:prod
restart: always
depends_on:
Expand Down

0 comments on commit 40d8e9d

Please sign in to comment.