-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
70 lines (66 loc) · 1.43 KB
/
docker-compose.yaml
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'
services:
my-app:
build:
context: .
dockerfile: Dockerfile
working_dir: /go/src/github.com/feildrixliemdra/go-boilerplate
container_name: my-app
hostname: my-app
networks:
- code-network
volumes:
- .:/go/src/github.com/feildrixliemdra/go-boilerplate
ports:
- '8081:8081'
depends_on:
- postgre
# - mongo
postgre:
image: postgres:16.3
restart: always
container_name: postgre
hostname: postgre
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: go-boilerplate
PGDATA: /data/postgre
POSTGRES_USER: admin
TZ: "Asia/Jakarta"
volumes:
- ~/apps/postgres:/var/lib/postgresql/data
ports:
- '5432:5432'
networks:
- code-network
## uncomment if you need mongodb
# mongo:
# image: mongo:4.2
# container_name: mongo
# restart: always
# environment:
# MONGO_INITDB_ROOT_USERNAME: root
# MONGO_INITDB_ROOT_PASSWORD: secret
# TZ: "Asia/Jakarta"
# volumes:
# - mongo:/data/db
# ports:
# - 28017:27017
#
# mongo-express:
# image: mongo-express
# container_name: mongo-express
# restart: always
# ports:
# - 9081:8081
# environment:
# ME_CONFIG_MONGODB_ADMINUSERNAME: root
# ME_CONFIG_MONGODB_ADMINPASSWORD: secret
volumes:
postgre:
driver: local
# mongo:
# driver: local
networks:
code-network:
driver: bridge