-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (37 loc) · 939 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
version: '1'
services:
ruby-app:
container_name: 'ruby-blogonrails'
build: .
env_file: .env
networks:
- blogonrails-network
ports:
- '4004:4004'
volumes:
- .:/home/server/blogonrails
image: 'blogonrails:1.0'
depends_on:
- db-blogonrails
restart: always
db-blogonrails:
container_name: postgres-blogonrails
image: 'tobi312/rpi-postgresql-postgis:15-3.3-alpine-arm'
env_file: .env
networks:
- blogonrails-network
ports:
- '5438:${PGPORT}'
environment:
- POSTGRES_USER=${PGUSER}
- POSTGRES_PASSWORD=${PGPASSWORD}
- POSTGRES_DB=${PGDATABASE}
volumes:
- db-data:/var/lib/postgresql/data # persist data even if container shuts down
restart: always
volumes:
db-data: # names volumes can be managed easier using docker-compose
networks:
blogonrails-network:
name: blogonrails-network
driver: bridge