mirror of
https://github.com/ledgersmb/ledgersmb-docker.git
synced 2025-08-20 07:37:24 -04:00
* feat: provide image with nginx * Re-use parent container configuration and startup scripts * Rewrite proxy Dockerfile: * ARCH used to be hard-coded; is now set according to the architecture being built * Build from the associated LedgerSMB base image (not from 'lsmb-split') * More deletion of non-required files (/usr/share/doc/*) * Fewer layers by combining RUN commands * Use 'server-start' script generated by the installer instead of repeating ourselves * Don't expose the status module It won't be accessible anyway: the localhost address is the one inside the container... * Ensure relative redirects When the container port :80 is exposed as :8080 on the host, nginx redirects to http://localhost:80/login.pl with a relative path, instead of http://localhost:8080/login.pl; the container isn't bound to :80, so that request fails... * Rename proxy layer image * Adjust 'build' script to publish base and regular images --------- Co-authored-by: Walid Mujahid <walidmujahid@gmail.com>
37 lines
908 B
YAML
37 lines
908 B
YAML
# Use this docker-compose file as:
|
|
#
|
|
# docker-compose -f docker-compose.yml -f docker-compose-reverseproxy.yml up -d
|
|
#
|
|
#
|
|
# This command creates one
|
|
# compose 'project' consisting of three containers
|
|
#
|
|
# 1. The PostgreSQL data container
|
|
# 2. The LedgerSMB application container
|
|
# 3. The Nginx reverse proxy container
|
|
#
|
|
# In addition to publishing LedgerSMB on port 5762 on localhost,
|
|
# this project also publishes Nginx's reverse proxied content on
|
|
# port 8080 on localhost
|
|
|
|
version: "3.2"
|
|
services:
|
|
proxy:
|
|
depends_on:
|
|
- lsmb
|
|
image: nginx:1-alpine
|
|
volumes:
|
|
- "lsmbdata:/srv/ledgersmb"
|
|
- "./nginx.conf:/etc/nginx/nginx.conf"
|
|
ports:
|
|
- "8080:8080"
|
|
# Comment the line below to stop the container from restarting on boot
|
|
# unless it was manually stopped
|
|
restart: unless-stopped
|
|
lsmb:
|
|
volumes:
|
|
- "lsmbdata:/srv/ledgersmb"
|
|
|
|
volumes:
|
|
lsmbdata:
|