-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-prod.yml
70 lines (65 loc) · 1.65 KB
/
docker-compose-prod.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
64
65
66
67
68
69
70
version: "3.9"
services:
sms-postgres:
image: postgres:15.3-alpine
hostname: ${DATABASE_HOST}
container_name: sms-postgres
command: -p ${DATABASE_PORT} # Change the default port
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
# - PGPORT=${DATABASE_PORT}
expose:
- "${DATABASE_PORT}"
ports:
- "${DATABASE_PORT}:${DATABASE_PORT}"
restart: always
volumes:
- airplane-postgres:/var/lib/postgresql/data
sms-pgadmin:
image: dpage/pgadmin4:latest
container_name: sms-pgadmin
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_MAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_PW}
ports:
- "5050:80"
restart: always
sms-backend:
build:
context: .
dockerfile: ./Dockerfile
command: >
/bin/sh -c "
./wait-for-it.sh ${DATABASE_HOST}:${DATABASE_PORT} &&
./wait-for-it.sh message-broker:5672 &&
./main
"
container_name: sms-backend
depends_on:
- sms-postgres
- sms-message-broker
hostname: backend
working_dir: /root/
restart: always
env_file:
- ".env"
ports:
- "${EXPOSE_PORT}:${EXPOSE_PORT}"
sms-message-broker:
image: rabbitmq:3-management-alpine
container_name: message-broker
ports:
- 5672:5672 # for sender and consumer connections
- 15672:15672 # for serve RabbitMQ GUI
volumes:
- rabbitmq-lib:/var/lib/rabbitmq
- rabbitmq-log:/var/log/rabbitmq
restart: always
# networks:
# - dev-network
volumes:
airplane-postgres:
rabbitmq-lib:
rabbitmq-log: