Skip to content

Commit

Permalink
Merge pull request #44 from Giveth/add/logging-config
Browse files Browse the repository at this point in the history
Adding logging configs
  • Loading branch information
mhmdksh authored May 7, 2024
2 parents d73d5ec + cf9e90d commit c0b2cc9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
25 changes: 25 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# Global Options
{
log global {
output file /usr/src/app/global.log
format json
level error
}
servers {
metrics
}
admin 0.0.0.0:2020
}

# ADMIN ROUTE ####
:2019 {
route {
@allowed {
path /*
remote_ip {$IP_WHITELIST}
}
reverse_proxy @allowed 127.0.0.1:2020
respond 403
}
}

# HTTP site block
{$GQL_URL} {
reverse_proxy devouch:4350
Expand Down
11 changes: 8 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ services:
squid-db:
image: postgres:15
container_name: squid-db
restart: always
networks:
- devouch-be
environment:
Expand All @@ -21,6 +22,7 @@ services:
context: .
dockerfile: Dockerfile
container_name: devouch-be
restart: always
networks:
- devouch-be
env_file:
Expand All @@ -39,6 +41,8 @@ services:
ports:
- 80:80
- 443:443
- 2019:2019
- 2020:2020
env_file:
- .env
environment:
Expand All @@ -48,10 +52,11 @@ services:
- caddy_config:/config
- ./Caddyfile:/etc/caddy/Caddyfile

networks:
devouch-be:

volumes:
caddy_data:
caddy_config:
db-data:

networks:
devouch-be:
driver: bridge

0 comments on commit c0b2cc9

Please sign in to comment.