Skip to content

Commit

Permalink
updating psotgres connection data
Browse files Browse the repository at this point in the history
updating mythic-cli to add command for postgres connection
  • Loading branch information
its-a-feature committed Feb 11, 2024
1 parent 0bd89ac commit dcebe26
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
3 changes: 2 additions & 1 deletion Mythic_CLI/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 0.2.13 - 2024-02-10
## 0.2.14 - 2024-02-10

### Changed

- Updated postgres processing for exposed ports for proper handling in Docker vs docker-compose
- Reverted back to using command in docker-compose to fix permissions issues

## 0.2.12 - 2024-02-09

Expand Down
2 changes: 1 addition & 1 deletion Mythic_CLI/src/cmd/config/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ package config

var (
// Version Mythic CLI version
Version = "v0.2.13"
Version = "v0.2.14"
)
1 change: 1 addition & 0 deletions Mythic_CLI/src/cmd/internal/serviceMetadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func AddMythicService(service string) {
"${POSTGRES_PORT}:${POSTGRES_PORT}",
}
}
pStruct["command"] = "postgres -c \"max_connections=100\" -p ${POSTGRES_PORT} -c config_file=/etc/postgresql.conf"
environment := []string{
"POSTGRES_DB=${POSTGRES_DB}",
"POSTGRES_USER=${POSTGRES_USER}",
Expand Down
5 changes: 1 addition & 4 deletions postgres-docker/.docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ COPY ["configuration.sh", "/docker-entrypoint-initdb.d/configuration.sh"]
COPY ["postgres.conf", "/etc/postgres.conf"]

HEALTHCHECK --interval=30s --timeout=30s --retries=5 --start-period=20s \
CMD pg_isready -d mythic_db -U mythic_user || exit 1
ENV POSTGRES_PORT=5432
USER postgres
ENTRYPOINT postgres -c config_file=/etc/postgres.conf -c max_connections=100 -p ${POSTGRES_PORT}
CMD pg_isready -d mythic_db -U mythic_user || exit 1
5 changes: 1 addition & 4 deletions postgres-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ COPY ["configuration.sh", "/docker-entrypoint-initdb.d/configuration.sh"]
COPY ["postgres.conf", "/etc/postgres.conf"]

HEALTHCHECK --interval=30s --timeout=30s --retries=5 --start-period=20s \
CMD pg_isready -d mythic_db -U mythic_user || exit 1
ENV POSTGRES_PORT=5432
USER postgres
ENTRYPOINT postgres -c config_file=/etc/postgres.conf -c max_connections=100 -p ${POSTGRES_PORT}
CMD pg_isready -d mythic_db -U mythic_user || exit 1

0 comments on commit dcebe26

Please sign in to comment.