Files
osem/docker-compose.yml.production-example
Henne Vogelsang d70687c9b9 Get rid of bin/osem-init.sh
Setting up the app if it isn't already setup should be some
concious step and not run every time we boot the containers.

This also fixes the problem that processes are not killed
if you stop the container with CTRL+C because the bash script
is not passing on signals.
2021-10-21 16:14:47 +02:00

35 lines
926 B
Plaintext

version: "2.4"
services:
production_database:
image: postgres:12-alpine
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_PASSWORD: mysecretpassword
volumes:
- osem_production_database:/var/lib/postgresql/data/pgdata
production_web:
build:
context: .
dockerfile: Dockerfile.production
depends_on:
- production_database
ports:
- 8080:3000
env_file: .env.production # see dotenv.example file
environment:
OSEM_DB_HOST: production_database
RAILS_SERVE_STATIC_FILES: 'true'
command: foreman start -p 3000
volumes:
- osem_production_web_data:/osem/public/system
- osem_production_web_assets:/osem/public/assets
- osem_production_web_logs:/osem/log
# named volumes to persist data
volumes:
osem_production_database:
osem_production_web_data:
osem_production_web_assets:
osem_production_web_logs: