-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
42 lines (42 loc) · 936 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
38
39
40
41
42
version: '3'
services:
postgres:
image: postgres:9.6
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- database_folder:/var/lib/postgresql/data/pgdata
env_file:
- .env
restart: always
networks:
- schorpong_network
web:
build: .
command: sh -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
environment:
- RAILS_SERVE_STATIC_FILES=true
- RAILS_ENV=production
- DATABASE_USER=postgres
- DATABASE_NAME=schorpong
- DATABASE_HOST=postgres
restart: always
env_file:
- .env
volumes:
- public_folder:/schorpong/public
ports:
- "3001:3000"
networks:
- schorpong_network
depends_on:
- postgres
networks:
schorpong_network:
volumes:
public_folder:
external:
name: schorpong_public
database_folder:
external:
name: schorpong_database