-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
55 lines (49 loc) · 1.71 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
version: '3'
######## app下api+rpc , Before starting this project, start the environment that the project depends on docker-compose-env.yml #######
services:
#前端网关nginx-gateay (只代理looklook,admin-api不在这里做代理)
# Front-end gateway nginx-gateway (Only agent looklook,admin-api Do not be an agent here)
nginx-gateway:
image: nginx:1.26.1
container_name: nginx-gateway
restart: always
privileged: true
environment:
- TZ=Asia/Shanghai
ports:
- 8888:8081
volumes:
- ./deploy/nginx/conf.d:/etc/nginx/conf.d
- ./data/nginx/log:/var/log/nginx
networks:
- golodge_net
depends_on:
- golodge
#前端api + 业务rpc - Front-end API + business RPC
golodge:
# docker-hub : https://hub.docker.com/r/lyumikael/gomodd
# dockerfile: https://github.com/Mikaelemmmm/gomodd , If you are macOs m1\m2 use dockerfile yourself to build the image
image: lyumikael/gomodd:v1.20.3
container_name: golodge
environment:
# 时区上海 - Timezone Shanghai
TZ: Asia/Shanghai
GOPROXY: https://goproxy.cn,direct
OSS_ACCESS_KEY_ID: "${OSS_ACCESS_KEY_ID}"
OSS_ACCESS_KEY_SECRET: "${OSS_ACCESS_KEY_SECRET}"
working_dir: /go/looklook
volumes:
# 这里的 "." 相当于把整个项目挂载到 docker 中了, 前面是当前项目,后面是 docker 容器内
# 使用 docker 部署时需要额外注意,配置文件的路径不能当作在宿主机文件系统上的路径一样
- .:/go/looklook
privileged: true
restart: always
networks:
- golodge_net
networks:
golodge_net:
external: true
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16