Serialize whole quote
[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     command: ./manage.py runserver 0.0.0.0:8000
30
31   celery:
32     <<: *app-base
33     command: celery -A wolnelektury worker -l info
34
35   db:
36     build:
37       context: .
38       target: postgres
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   nginx:
51     build:
52       context: .
53       target: nginx
54       args:
55         UID: ${UID:-1000}
56         GID: ${GID:-1000}
57     ports:
58       - "127.0.0.1:8101:80"
59     volumes:
60       - ./var/media:/app/var/media:ro
61       - ./scripts/nginx.conf:/etc/nginx/conf.d/default.conf:ro
62     depends_on:
63       - web
64
65
66 volumes:
67   ipython: