Image with supervisor and prereqs for ruby app deployment
342
Image based on postgres and contains supervisor that runs sshd, postgresql, cron and nginx processes. Installed packages:
Tag determines ruby version installed, e.g.: webgears/supervisor:2.3.0 have ruby version 2.3.0 installed.
** docker compose.yml: **
version: '2'
services:
supervisor:
image: webgears/supervisor
restart: always
hostname: supervisor
ports:
- 22 #map host random port to ssh, http and https port of container
- 80
#- 443
volumes:
- ./conf/ssh/:/root/.ssh/ #put your 'authorized_keys' here
- ./conf/nginx.conf:/etc/nginx/nginx.conf #nginx main config file
- ./conf/nginx.conf.d/:/etc/nginx/conf.d/ #nginx included config files
- ./conf/project-rotate:/etc/logrotate.d/project-rotate #logrotate conf file to rotate logs inside container
- ./conf/pgdump:/etc/cron.daily/pgdump #postgresql database dump script
- ./pgdata/:/var/lib/postgresql/data/pgdata/ #postgresql database files
- ./pgdump/:/root/pgdump/ #directory to store postgresql dumps
- ./app/:/var/www/app/ #directory with all application and persistent data
- ./gems/:/var/gems/ #ruby gems directory
environment: #some variables determines container in consul with registrator and not required
- SERVICE_22_NAME=ssh #consul: which host port mapped to container ssh port
- SERVICE_TAGS=supervisor #consul: what is service name
- GEM_HOME=/var/gems #where gems will be stored
- GEM_PATH=/var/gems
- SERVICE_80_NAME=nginx-80 #consul: which host port mapped to container http port
- SERVICE_443_NAME=nginx-443 #consul: which host port mapped to container https port
- POSTGRES_PASSWORD=${postgres_passwd} #postgres database password, user, db name
#- POSTGRES_USER=postgres
#- POSTGRES_DB=postgres
- PGDATA=/var/lib/postgresql/data/pgdata #where postgres store its data
Content type
Image
Digest
Size
333.3 MB
Last updated
over 10 years ago
docker pull webgears/supervisor