blog/docker-compose.yml

59 lines
1.1 KiB
YAML
Raw Normal View History

2023-02-07 06:02:51 +00:00
version: "3"
services:
db:
2023-02-11 11:48:39 +00:00
image: docker.io/postgres:15-alpine
2023-02-07 06:02:51 +00:00
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- db:/var/lib/postgresql/data
adminer:
2023-02-11 11:48:39 +00:00
image: docker.io/adminer:4-standalone
2023-02-07 06:02:51 +00:00
restart: always
ports:
- 8080:8080
depends_on:
- db
2023-02-11 11:48:39 +00:00
redis:
image: docker.io/redis:7-alpine
restart: always
2023-02-12 08:18:56 +00:00
volumes:
- redis:/data
2023-02-11 11:48:39 +00:00
redis-commander:
image: rediscommander/redis-commander:latest
restart: always
environment:
REDIS_HOSTS: local:redis:6379
ports:
- 8081:8081
depends_on:
- redis
blog:
image: git.dergrimm.net/dergrimm/blog:latest
2023-02-07 06:02:51 +00:00
build:
context: ./backend
restart: always
command: worker
environment:
2023-02-11 11:48:39 +00:00
BACKEND_BIND_URL: 0.0.0.0:80
2023-02-07 06:02:51 +00:00
BACKEND_DB_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_USER}
2023-02-11 11:48:39 +00:00
BACKEND_REDIS_URL: redis://redis
2023-02-12 08:18:56 +00:00
BACKEND_CACHE_TTL: 3600
2023-02-07 06:02:51 +00:00
volumes:
- ./blog:/blog
ports:
- 80:80
depends_on:
- db
2023-02-11 11:48:39 +00:00
- redis
2023-02-07 06:02:51 +00:00
volumes:
db:
2023-02-12 08:18:56 +00:00
redis: