-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (50 loc) · 1.05 KB
/
docker-compose.yml
File metadata and controls
51 lines (50 loc) · 1.05 KB
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
version: '3'
services:
app:
image: cosmtrek/air
container_name: "app"
volumes:
- ./:/usr/app
environment:
air_wd: "/usr/app"
networks:
- gofiber
ports:
- "${FORWARD_APP_PORT:-8080}:${APP_PORT:-8080}"
postgres:
image: postgres:15.1-alpine
container_name: "postgres"
environment:
POSTGRES_DB: ${DB_DATABASE}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
PGDATA: "/data/postgres"
volumes:
- postgres:/data/postgres
networks:
- gofiber
ports:
- "${FORWARD_DB_PORT:-5432}:${DB_PORT:-5432}"
redis:
image: "redis:alpine"
container_name: "redis"
command: >
--requirepass ${REDIS_PASSWORD}
ports:
- "${FORWARD_REDIS_PORT:-6379}:${REDIS_PORT:-6379}"
volumes:
- "redis:/data"
networks:
- gofiber
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
retries: 3
timeout: 5s
networks:
gofiber:
driver: bridge
volumes:
postgres:
driver: local
redis:
driver: local