-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (58 loc) · 1.38 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
version: '3.7'
services:
cat-service:
build: docker/cat-service
environment:
KOJO_REDIS_PORT: 6379
KOJO_REDIS_HOST: "redis"
REDIS_PORT: 6379
REDIS_HOST: "redis"
DATABASE_USERNAME: "user"
DATABASE_PASSWORD: "password"
DATABASE_ADAPTER: "pgsql"
DATABASE_HOST: "postgres"
DATABASE_NAME: "cat_service"
DATABASE_PORT: "5432"
restart: always
depends_on:
- postgres
- redis
ports:
- 9040
- 9000
volumes:
- ../CatService:/var/www/html/cat-service
# Shares AWS credentials to the docker container
- $HOME/.aws:/root/.aws
- $HOME/.aws:/var/www/.aws
nginx:
build:
context: docker/nginx
ports:
- 80:80
- 443:443
volumes:
- ../CatService:/var/www/html/cat-service
- ./Logs/nginx/:/var/log/nginx
- ./docker/nginx/sites/:/etc/nginx/sites-available
- ./docker/nginx/conf.d/:/etc/nginx/conf.d
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- cat-service
redis:
image: redis:latest
ports:
- 6379:6379
postgres:
image: postgres:latest
environment:
POSTGRES_USER: "user"
POSTGRES_PASSWORD: "password"
restart: always
ports:
- 5432:5432
volumes:
- postgres:/var/lib/postgresql/data
- ./postgres/init:/docker-entrypoint-initdb.d
volumes:
postgres: