Skip to content

Commit

Permalink
edit docker compose local
Browse files Browse the repository at this point in the history
  • Loading branch information
h-varmazyar committed Aug 10, 2023
1 parent ced301a commit 1c440bf
Show file tree
Hide file tree
Showing 14 changed files with 344 additions and 352 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ build
tmp
old-codes

*.yaml
*.yaml
*.yml
119 changes: 81 additions & 38 deletions deploy/docker-compose.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ version: '3.7'

networks:
gate:
external: true
driver: bridge

services:
postgres:
container_name: postgres
deploy:
resources:
limits:
cpus: '0.2'
memory: '250m'
image: postgres
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
Expand All @@ -15,11 +20,16 @@ services:
networks:
- gate
ports:
- 5432:5432
- "5432:5432"
restart: always

redis:
container_name: redis
deploy:
resources:
limits:
cpus: '0.1'
memory: '100m'
image: bitnami/redis:latest
command: redis-server --requirepass ${REDIS_PASSWORD}
environment:
Expand All @@ -29,11 +39,16 @@ services:
networks:
- gate
ports:
- 6379:6379
- "6379:6379"
restart: always

rabbitmq:
container_name: rabbitmq
deploy:
resources:
limits:
cpus: '0.1'
memory: '250m'
image: rabbitmq:3.8-management
environment:
- RABBITMQ_ERLANG_COOKIE=SWQOKODSQALRPCLNMEQG
Expand All @@ -45,112 +60,140 @@ services:
networks:
- gate
ports:
- 15672:15672
- 5672:5672
- "15672:15672"
- "5672:5672"
restart: always

chipmunk:
container_name: chipmunk
image: chipmunk:v2.1.3
deploy:
resources:
limits:
cpus: '0.2'
memory: '250m'
image: chipmunk:${CHIPMUNK_VERSION}
build:
context: ..
dockerfile: services/chipmunk/deploy/Dockerfile
args:
VERSION: v2.1.3
VERSION: ${CHIPMUNK_VERSION}
volumes:
- /srv/configs/chipmunk/app.yaml:/app/configs/config.yaml
networks:
- gate
depends_on:
- postgres
- rabbitmq
# depends_on:
# - postgres
# - rabbitmq
restart: always

core:
container_name: core
image: core:v2.1.3
deploy:
resources:
limits:
cpus: '0.1'
memory: '250m'
image: core:${CORE_VERSION}
build:
context: ..
dockerfile: services/core/deploy/Dockerfile
args:
VERSION: v2.1.3
VERSION: ${CORE_VERSION}
volumes:
- /srv/configs/core/app.yaml:/app/configs/config.yaml
networks:
- gate
depends_on:
- postgres
- rabbitmq
# depends_on:
# - postgres
# - rabbitmq
restart: always

eagle:
container_name: eagle
image: eagle:v1.1.3
deploy:
resources:
limits:
cpus: '0.06'
memory: '50m'
image: eagle:${EAGLE_VERSION}
build:
context: ..
dockerfile: services/eagle/deploy/Dockerfile
args:
VERSION: v1.1.3
VERSION: ${EAGLE_VERSION}
volumes:
- /srv/configs/eagle/app.yaml:/app/configs/config.yaml
networks:
- gate
depends_on:
- postgres
- redis
# depends_on:
# - postgres
# - redis
restart: always

raven:
container_name: raven
image: gatec/raven:${VERSION}
# build:
# context: ..
# dockerfile: services/raven/deploy/Dockerfile
# args:
# VERSION: v1.2.3
deploy:
resources:
limits:
cpus: '0.02'
memory: '50m'
image: raven:${RAVEN_VERSION}
build:
context: ..
dockerfile: services/raven/deploy/Dockerfile
args:
VERSION: ${RAVEN_VERSION}
volumes:
- /srv/configs/raven/app.yaml:/app/configs/config.yaml
ports:
- 3030:8080
- "8080:8080"
networks:
- gate
depends_on:
- postgres
- redis
restart: always

network:
container_name: network
image: network:v1.2.5
deploy:
resources:
limits:
cpus: '0.2'
memory: '250m'
image: network:${NETWORK_VERSION}
build:
context: ..
dockerfile: services/network/deploy/Dockerfile
args:
VERSION: v1.2.5
VERSION: ${NETWORK_VERSION}
volumes:
- /srv/configs/network/app.yaml:/app/configs/config.yaml
networks:
- gate
depends_on:
- postgres
- redis
# depends_on:
# - postgres
restart: always

telegram_bot:
container_name: telegramBot
image: telegram_bot:v1.1.2
deploy:
resources:
limits:
cpus: '0.02'
memory: '50m'
image: telegram_bot:${TELEGRAM_BOT_VERSION}
build:
context: ..
dockerfile: services/telegramBot/deploy/Dockerfile
args:
VERSION: v1.1.2
VERSION: ${TELEGRAM_BOT_VERSION}
volumes:
- /srv/configs/telegramBot/app.yaml:/app/configs/config.yaml
networks:
- gate
depends_on:
- postgres
- redis
# depends_on:
# - postgres
# - redis
restart: always

volumes:
Expand Down
11 changes: 10 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ require (
github.com/streadway/amqp v1.0.0
github.com/swaggo/http-swagger/v2 v2.0.1
github.com/swaggo/swag v1.16.1
golang.ngrok.com/ngrok v1.3.1
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef
google.golang.org/grpc v1.52.0
google.golang.org/protobuf v1.28.1
Expand All @@ -40,8 +41,11 @@ require (
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.11.0 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/gofrs/uuid v4.2.0+incompatible // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/log15 v3.0.0-testing.3+incompatible // indirect
github.com/inconshreveable/log15/v3 v3.0.0-testing.5 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.12.1 // indirect
github.com/jackc/pgio v1.0.0 // indirect
Expand All @@ -53,9 +57,12 @@ require (
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/spf13/afero v1.9.3 // indirect
Expand All @@ -64,12 +71,14 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/swaggo/files/v2 v2.0.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.ngrok.com/muxado/v2 v2.0.0 // indirect
golang.org/x/crypto v0.10.0 // indirect
golang.org/x/net v0.11.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/term v0.9.0 // indirect
golang.org/x/text v0.10.0 // indirect
golang.org/x/tools v0.10.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 1c440bf

Please sign in to comment.