Create /var/lib/pixa directory in Docker image for database/cache
- Change default StateDir from ./data to /var/lib/pixa (proper Unix convention) - Create directory owned by pixad user in Dockerfile - Set WORKDIR to /var/lib/pixa
This commit is contained in:
parent
fc49e69d8b
commit
d2e2e319be
@ -35,9 +35,13 @@ RUN apk add --no-cache \
|
||||
# Copy binary from builder
|
||||
COPY --from=builder /pixad /usr/local/bin/pixad
|
||||
|
||||
# Create non-root user
|
||||
RUN adduser -D -H -s /sbin/nologin pixad
|
||||
# Create non-root user and data directory
|
||||
RUN adduser -D -H -s /sbin/nologin pixad && \
|
||||
mkdir -p /var/lib/pixa && \
|
||||
chown pixad:pixad /var/lib/pixa
|
||||
|
||||
USER pixad
|
||||
WORKDIR /var/lib/pixa
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ import (
|
||||
// Default configuration values.
|
||||
const (
|
||||
DefaultPort = 8080
|
||||
DefaultStateDir = "./data"
|
||||
DefaultStateDir = "/var/lib/pixa"
|
||||
DefaultUpstreamConnectionsPerHost = 20
|
||||
)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user