-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
63 lines (58 loc) · 1.34 KB
/
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
54
55
56
57
58
59
60
61
62
63
version: '3'
networks:
go-rest-api.network:
driver: bridge
volumes:
go-rest-api.redis:
go-rest-api.postgres:
services:
api:
build:
context: .
dockerfile: Dockerfile.local
container_name: go-rest-api.api
restart: always
tty: true
env_file: .env.local
depends_on:
- redis
- postgres
volumes:
- .:/go/src
networks:
- go-rest-api.network
ports:
- "${DOCKER_PORT:-3301}:3301"
- "${PORT:-3301}:3301"
environment:
- APP_ENV=${APP_ENV:-local}
- RUN_IN_DOCKER=true
postgres:
image: bitnami/postgresql:16
container_name: go-rest-api.postgres
tty: true
env_file: .env.local
volumes:
- go-rest-api.postgres:/bitnami/postgresql
networks:
- go-rest-api.network
ports:
- "${DB_PORT:-5432}:5432"
environment:
- POSTGRESQL_USERNAME=${DB_USERNAME:-root}
- POSTGRESQL_PASSWORD=${DB_PASSWORD:-root}
- POSTGRESQL_DATABASE=${DB_NAME:-development}
redis:
image: bitnami/redis:latest
container_name: go-rest-api.redis
tty: true
env_file: .env.local
volumes:
- go-rest-api.redis:/bitnami/redis/data
networks:
- go-rest-api.network
ports:
- "${REDIS_PORT:-6379}:6379"
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD:-redis}
- ALLOW_EMPTY_PASSWORD=no