version: '3.8' services: backend: hostname: mtsuserver image: ghcr.io/mangatsu/server:latest user: 1000:1000 # should have access to the volumes. For data dir, both read and write is required. For libraries only read is required. ports: - '5050:5050' # container:host restart: always environment: # Environment: production or development MTSU_ENV: production # Log level: debug, info, warn, error MTSU_LOG_LEVEL: info # Credentials for the initial admin user. Changing them is recommended. MTSU_INITIAL_ADMIN_NAME: admin MTSU_INITIAL_ADMIN_PW: admin321 # Make sure that the paths match containerpaths below in the volumes section! # Format: ;;;; ... MTSU_BASE_PATHS: freeform1;/library1;;structured2;/library2 # Disable internal cache server? Remember apostrophes around the value. MTSU_DISABLE_CACHE_SERVER: 'false' # Max size of the cache where galleries are extracted from the library in MB. Can overflow a bit especially if set too low. MTSU_CACHE_SIZE: 10000 # Time to live for the cache in seconds (604800 = 1 week). MTSU_CACHE_TTL: 604800 # Modes: public, restricted, private MTSU_VISIBILITY: private # Password for restricted mode. MTSU_RESTRICTED_PASSPHRASE: secretpassword # Allow registrations? Remember apostrophes around the value. MTSU_REGISTRATIONS: 'false' # Secret to sign JWTs for login sessions in the backend. Recommended to change. MTSU_JWT_SECRET: 9Wag7sMvKl3aF6K5lwIg6TI42ia2f6BstZAVrdJIq8Mp38lnl7UzQMC1qjKyZCBzHFGbbqsA0gKcHqDuyXQAhWoJ0lcx4K5q # Domain for the server. Used in cookies. # For example, if the address for the server is "api.example.com", and for the frontend "read.example.com", # the value here should be "example.com" for the cookies to work properly between subdomains. # https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#define_where_cookies_are_sent MTSU_DOMAIN: example.org # When true, the server only allows authenticated connections from the MTSU_DOMAIN and its subdomains (eg .*.example.org). # When false, connections from every origin is allowed. # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin MTSU_STRICT_ACAO: 'false' # When true, Mangatsu can be accessed only through HTTPS or localhost domains. MTSU_SECURE: 'true' # Thumbnail image format: webp MTSU_THUMBNAIL_FORMAT: webp # Similarity threshold for the fuzzy match for gallery and metadata filenames. # The higher the value, the more similar the results has to be to match. 0.1 - 1.0. MTSU_FUZZY_SEARCH_SIMILARITY: 0.7 # Set to false to use right-to-left (RTL) default for galleries. Otherwise, defaults to left-to-right (like Japanese manga). MTSU_LTR: 'true' # Usually the following three envs don't need changing as they are the container's internal hostname, port and data path. # In case of port conflict, change the port here and the first one above in the ports section. MTSU_HOSTNAME: mtsuserver MTSU_PORT: 5050 MTSU_DATA_PATH: /data # Above environmental variables can also be loaded from a file: #env_file: # - ./.env volumes: # Change paths below. Add as many volumes as you need. Format: hostpath:containerpath:ro (ro = read-only) # Make sure that the containerpaths match the paths above or the ones in the .env file. - "/path/to/data:/data" - "/path/to/your/library/1:/library1:ro" - "/path/to/your/library/2:/library2:ro" frontend: hostname: mtsuweb image: ghcr.io/mangatsu/web:latest ports: - '3030:3030' # container:host restart: always environment: NODE_ENV: production # URL to the backend server above. If running locally, localhost can be used in the following way: http://localhost:5050 NEXT_PUBLIC_MANGATSU_API_URL: https://mangatsu-api.example.com # Internal URL to the backend server. Required when running both containers locally without external network. # If not specified, some calls such as image URLs will be made through the public URL. NEXT_PUBLIC_INTERNAL_MANGATSU_API_URL: http://mtsuserver:5050 # Hostname or the domain where images are hosted. # Usually the same as the domain in the internal (if specified) API URL, or otherwise the public API URL. NEXT_MANGATSU_IMAGE_HOSTNAME: mtsuserver # If some other container is already using the same port, you can use this to avoid conflicts. Remember to change the first port in 3030:3030 too. PORT: 3030 # Above environmental variables can also be loaded from a file: #env_file: # - ./.env.web