mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-09-15 06:47:08 -04:00
Addresses CodeRabbit review on PR #4656: - env:provision CI3 branch was persisting *plaintext* secrets (saveAll($plain)) instead of the CI4 ciphertext, unlike the ConvertToCI4 migration. Now encrypts with encryptAll(), verifies the round trip, and saves the ciphertext. - The ospos_env named volume mounted at /app/.env made .env a directory, so atomicWriteFile's rename() failed and spark env:provision could not start apache. Switch to a bind mount of a host file (./.env) which persists and stays a file. - Add a regression test asserting the command persists ciphertext (not plaintext).
32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
include:
|
|
- docker/docker-mysql.yml
|
|
|
|
services:
|
|
ospos:
|
|
image: jekkos/opensourcepos:master
|
|
restart: always
|
|
depends_on:
|
|
- mysql
|
|
ports:
|
|
- "80:80"
|
|
networks:
|
|
- app_net
|
|
command: ["sh", "-c", "php spark env:provision && exec apache2-foreground"]
|
|
volumes:
|
|
# .env holds the two runtime-generated secrets (encryption.key +
|
|
# throttle.key), persisted as a single host file so the same keys
|
|
# survive container recreation (a named volume is a directory and
|
|
# forces .env to be a directory, breaking atomicWriteFile's rename).
|
|
- ./.env:/app/.env
|
|
- uploads:/app/public/uploads
|
|
- logs:/app/writable/logs
|
|
environment:
|
|
- CI_ENVIRONMENT=production
|
|
- ALLOWED_HOSTNAMES=localhost
|
|
- FORCE_HTTPS=false
|
|
- PHP_TIMEZONE=UTC
|
|
- MYSQL_USERNAME=admin
|
|
- MYSQL_PASSWORD=pointofsale
|
|
- MYSQL_DB_NAME=ospos
|
|
- MYSQL_HOST_NAME=mysql
|