forked from evans22j/Budget-App
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
38 lines (37 loc) · 944 Bytes
/
docker-compose.yaml
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
version: '3'
services:
web-app:
build:
context: .
dockerfile: Dockerfile.multistaging
command: "rails server"
container_name: ruby-on-rails
environment:
- RAILS_ENV=${RAILS_ENV}
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- RAILS_MASTER_KEY=${RAILS_MASTER_KEY}
volumes:
- app-storage:/budget-app/storage
depends_on:
- database
ports:
- "3000:3000"
database:
image: postgres:14.2-alpine
container_name: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
command:
"postgres -c 'max_connections=500'"
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
ports:
- "5432:5432"
volumes:
postgres_data: {}
app-storage: {}