-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
49 lines (44 loc) · 976 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
39
40
41
42
43
44
45
46
47
48
49
version: '3'
services:
postgres:
image: postgres
container_name: trendle-postgres
ports:
- '5432:5432'
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: main
volumes:
- db-data:/var/lib/postgresql/data
networks:
- main-net
redis:
image: redis
container_name: trendle-redis
networks:
- main-net
ports:
- '6379:6379'
app:
entrypoint: "air"
build:
dockerfile: Dockerfile # Dockerfile name
context: . # Where Dockerfile is located
target: dev # Stage of multistage building
volumes:
- .:/app # Map this directory to /app directory inside the container
container_name: trendle-app
ports:
- '8080:8080'
depends_on:
- postgres
- redis
networks:
- main-net
command: /app/server
volumes:
db-data: # volume used by postgres service
networks:
main-net:
driver: bridge