-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
37 lines (34 loc) · 979 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
version: '3'
services:
sunberry-db:
image: bitnami/postgresql:11
volumes:
- ./docker/data/db:/bitnami/postgresql
environment:
- POSTGRESQL_DATABASE=sunberry
- POSTGRESQL_USERNAME=sunberry
- POSTGRESQL_PASSWORD=samplesecret
- POSTGRESQL_INITDB_ARGS=--encoding=UTF-8
sunberry-redis:
image: bitnami/redis
volumes:
- ./docker/data/redis:/bitnami/redis/data
environment:
- ALLOW_EMPTY_PASSWORD=yes
sunberry-code:
build:
context: .
dockerfile: docker/compose/rails/Dockerfile
volumes:
- ./:/srv
ports:
- "3000:3000"
environment:
- POSTGRESQL_URL=sunberry-db
- POSTGRESQL_DATABASE=sunberry
- POSTGRESQL_USERNAME=sunberry
- POSTGRESQL_PASSWORD=samplesecret
- REDIS_HOST=sunberry-redis
- RAILS_LOG_TO_STDOUT=true
- RAILS_ENV=production
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"