-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (45 loc) · 1.07 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
version: "3.5"
services:
db:
container_name: postgresDB
image: postgres:15.2-alpine
restart: unless-stopped
ports:
- "5432:5432"
volumes:
- ./db/init:/docker-entrypoint-initdb.d
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
nginx:
container_name: nginx
image: nginx:1.25.2-alpine
ports:
- "8080:8080"
expose:
- "8080"
volumes:
- ./app/etc/nginx/nginx.conf:/etc/nginx/nginx.conf
restart: always
links:
- "app_backend:app_backend"
app_backend:
container_name: app_backend
image: golang:1.20.2-alpine
restart: on-failure
ports:
- "8081:8080"
depends_on:
- db
volumes:
- ./app/core:/usr/src/app/core
working_dir: /usr/src/app/core
command: go run ./main.go
environment:
DB_HOST: ${POSTGRES_DB_HOST}
DB_PORT: ${POSTGRES_DB_PORT}
DB_USER: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_NAME: ${POSTGRES_DB_NAME}
LISTEN_PORT: "8080"
BIND_IP: ${BIND_IP}
SSL_MODE: ${POSTGRES_SSL_MODE}