Fuller docker config
[wolnelektury.git] / docker-compose.yml
1 x-app-base: &app-base
2   build:
3     context: .
4     target: dev
5     args:
6       UID: ${UID:-1000}
7       GID: ${GID:-1000}
8   env_file:
9    - .env
10   environment:
11     DEBUG: "True"
12   volumes:
13    - ./src:/app/src
14    - ./scripts:/app/scripts
15    - ./var/media:/app/var/media
16    - ./var/static:/app/var/static
17    - ./var/counters/:/app/var/counters
18    - ${LIBRARIAN:-/nonexistent}:/${LIBRARIAN:+edita}ble/librarian
19    - ipython:/app/.ipython
20   depends_on:
21    - db
22    - redis
23    - memcached
24   entrypoint: /app/scripts/entrypoint.sh
25
26 services:
27   web:
28     <<: *app-base
29     ports:
30      - "8000:8000"
31     command: ./manage.py runserver 0.0.0.0:8000
32
33   celery:
34     <<: *app-base
35     command: celery -A wolnelektury worker -l info
36
37   db:
38     image: postgres:18
39     env_file:
40       - .env
41     volumes:
42       - ./var/postgresql-data/:/var/lib/postgresql/
43
44   redis:
45     image: redis:8-alpine
46
47   memcached:
48     image: memcached:1.6-alpine
49
50
51 volumes:
52   ipython: