73 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			Django/Jinja
		
	
	
	
	
	
			
		
		
	
	
			73 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			Django/Jinja
		
	
	
	
	
	
| # See versions: https://github.com/gramps-project/gramps-web/pkgs/container/grampsweb
 | |
| 
 | |
| services:
 | |
| 
 | |
|   gramps_app: &gramps_app
 | |
|     image: ghcr.io/gramps-project/grampsweb:25.10.1
 | |
|     container_name: gramps_app
 | |
|     depends_on:
 | |
|       - gramps_redis
 | |
|     restart: unless-stopped
 | |
|     networks:
 | |
|       - "gramps_network"
 | |
|       - "web_proxy_network"
 | |
|     volumes:
 | |
|       - "{{ (data_dir, 'gramps_db') | path_join }}:/root/.gramps/grampsdb"  # persist Gramps database
 | |
|       - "{{ (data_dir, 'gramps_users') | path_join }}:/app/users"  # persist user database
 | |
|       - "{{ (data_dir, 'gramps_index') | path_join }}:/app/indexdir"  # persist search index
 | |
|       - "{{ (data_dir, 'gramps_thumb_cache') | path_join }}:/app/thumbnail_cache"  # persist thumbnails
 | |
|       - "{{ (data_dir, 'gramps_cache') | path_join }}:/app/cache"  # persist export and report caches
 | |
|       - "{{ (data_dir, 'gramps_secret') | path_join }}:/app/secret"  # persist flask secret
 | |
|       - "{{ (data_dir, 'gramps_media') | path_join }}:/app/media"  # persist media files
 | |
|     environment:
 | |
|       GRAMPSWEB_TREE: "Gramps"  # will create a new tree if not exists
 | |
|       GRAMPSWEB_SECRET_KEY: "{{ gramps_secret_key }}"
 | |
|       GRAMPSWEB_BASE_URL: "https://gramps.vakhrushev.me"
 | |
|       GRAMPSWEB_REGISTRATION_DISABLED: "true"
 | |
|       GRAMPSWEB_CELERY_CONFIG__broker_url: "redis://gramps_redis:6379/0"
 | |
|       GRAMPSWEB_CELERY_CONFIG__result_backend: "redis://gramps_redis:6379/0"
 | |
|       GRAMPSWEB_RATELIMIT_STORAGE_URI: "redis://gramps_redis:6379/1"
 | |
|       GUNICORN_NUM_WORKERS: 2
 | |
| 
 | |
|       # Email options
 | |
|       GRAMPSWEB_EMAIL_HOST: "{{ postbox_host }}"
 | |
|       GRAMPSWEB_EMAIL_PORT: "{{ postbox_port }}"
 | |
|       GRAMPSWEB_EMAIL_HOST_USER: "{{ postbox_user }}"
 | |
|       GRAMPSWEB_EMAIL_HOST_PASSWORD: "{{ postbox_pass }}"
 | |
|       GRAMPSWEB_EMAIL_USE_TLS: "false"
 | |
|       GRAMPSWEB_DEFAULT_FROM_EMAIL: "gramps@vakhrushev.me"
 | |
|       
 | |
|       # media storage at s3
 | |
|       GRAMPSWEB_MEDIA_BASE_DIR: "s3://av-gramps-media-storage"
 | |
|       AWS_ENDPOINT_URL: "{{ gramps_s3_endpoint }}"
 | |
|       AWS_ACCESS_KEY_ID: "{{ gramps_s3_access_key_id }}"
 | |
|       AWS_SECRET_ACCESS_KEY: "{{ gramps_s3_secret_access_key }}"
 | |
|       AWS_DEFAULT_REGION: "{{ gramps_s3_region }}"
 | |
| 
 | |
|   gramps_celery:
 | |
|     <<: *gramps_app  # YAML merge key copying the entire grampsweb service config    
 | |
|     container_name: gramps_celery
 | |
|     depends_on:
 | |
|       - gramps_redis
 | |
|     restart: unless-stopped
 | |
|     ports: []
 | |
|     networks:
 | |
|       - "gramps_network"
 | |
|     command: celery -A gramps_webapi.celery worker --loglevel=INFO --concurrency=2
 | |
| 
 | |
|   gramps_redis:
 | |
|     image: valkey/valkey:8.1.1-alpine
 | |
|     container_name: gramps_redis
 | |
|     restart: unless-stopped
 | |
|     networks:
 | |
|       - "gramps_network"
 | |
|       - "monitoring_network"
 | |
| 
 | |
| networks:
 | |
|   gramps_network:
 | |
|     driver: bridge
 | |
|   web_proxy_network:
 | |
|     external: true
 | |
|   monitoring_network:
 | |
|     external: true
 |