-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (53 loc) · 985 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
43
44
45
46
47
48
49
50
51
52
53
version: '3'
services:
api:
build:
context: ./www
dockerfile: Dockerfile
restart: always
container_name: quote_api
ports:
- '3333:80'
volumes:
- ./www:/var/www/html
networks:
- api
- database
depends_on:
- database
database:
image: postgres:15.4
container_name: quote_db
restart: always
ports:
- '5430:5432'
environment:
POSTGRES_USER: quote_user
POSTGRES_PASSWORD: quote_pass
POSTGRES_DB: favorites_quotes
volumes:
- db_data:/var/lib/postgresql/data
- ./init:/init
- ./init/tables.sql:/docker-entrypoint-initdb.d/tables.sql
networks:
- database
web:
build:
context: ./web
dockerfile: Dockerfile
restart: always
container_name: quote_web
ports:
- '3131:80'
volumes:
- ./web:/app
networks:
- web
depends_on:
- api
networks:
api:
database:
web:
volumes:
db_data: