Adapt Dockerfile.productiono to openSUSE Leap 15.6

- No need to manually install bundler anymore
- bundle to vendor/bundle
- build nokogiri against system libraries
- expose the port foreman is using
- serve static files
This commit is contained in:
Henne Vogelsang 2025-09-04 17:10:33 +02:00
parent eca537daf7
commit 93662dc489
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
3 changed files with 26 additions and 16 deletions

View file

@ -1,24 +1,25 @@
services:
production_database:
image: postgres:12-alpine
postgres:
image: postgres:16-alpine
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_USER: osem
POSTGRES_PASSWORD: mysecretpassword
volumes:
- osem_production_database:/var/lib/postgresql/data/pgdata
production_web:
osem:
build:
context: .
dockerfile: Dockerfile.production
depends_on:
- production_database
- postgres
ports:
- 8080:3000
- 80:5000
env_file: .env.production # see dotenv.example file
environment:
OSEM_DB_HOST: production_database
RAILS_SERVE_STATIC_FILES: 'true'
command: foreman start -p 3000
OSEM_DB_HOST: postgres
OSEM_DB_USER: osem
OSEM_DB_PASSWORD: mysecretpassword
volumes:
- osem_production_web_data:/osem/public/system
- osem_production_web_assets:/osem/public/assets