-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
67 lines (62 loc) · 1.63 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
64
65
66
67
version: "3.9"
services:
postgres:
image: postgres:15.3-alpine
hostname: ${DATABASE_HOST}
command: -p ${DATABASE_PORT} # Change the default port
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
expose:
- "${DATABASE_PORT}"
ports:
- "${DATABASE_PORT}:${DATABASE_PORT}"
restart: always
volumes:
- airplane-postgres:/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4:latest
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_MAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_PW}
ports:
- "5050:80"
restart: always
# volumes:
# - airplane-pgadmin:/var/lib/pgadmin
backend:
build:
context: .
dockerfile: ./Dockerfile
command: "./wait-for-it.sh ${DATABASE_HOST}:${DATABASE_PORT} -- ./main"
depends_on:
- postgres
hostname: backend
working_dir: /root/
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- DATABASE_HOST=${DATABASE_HOST}
- DATABASE_PORT=${DATABASE_PORT}
ports:
- "8080:8080"
# - "8081:8081"
# volumes:
# - airplane-backend:/root/
# proxy:
# image: nginx
# volumes:
# - type: bind
# source: ./proxy/nginx.conf
# target: /etc/nginx/conf.d/default.conf
# read_only: true
# ports:
# - 80:80
# depends_on:
# - backend
volumes:
airplane-postgres:
# airplane-pgadmin:
# airplane-backend: