Skip to content

Commit

Permalink
made sure that the dev environment is documented and that the securit…
Browse files Browse the repository at this point in the history
…y restrictions of the backend are the same in dev and prod
  • Loading branch information
CommanderStorm authored Apr 9, 2024
1 parent a655e15 commit 1363604
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 7 deletions.
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,28 @@ You can use the proxy service by visiting <https://cal.tum.app/> and following t
## Development
If you want to run the proxy service locally or contribute to the project, you will need:

- Go 1.19 or higher
- Go 1.22 or higher
- Docker (optional)

To run the service locally, follow these steps:

- Clone this repository: `git clone https://github.com/tum-calendar-proxy/tum-calendar-proxy.git`
- Navigate to the project directory: `cd tum-calendar-proxy`
- Run the proxy server: `go run cmd/proxy/proxy.go`
- Clone this repository
```sh
git clone https://github.com/tum-calendar-proxy/tum-calendar-proxy.git
```
- Navigate to the project directory:
```sh
cd tum-calendar-proxy
```
- Run the proxy server:
```sh
go run cmd/proxy/proxy.go
```
- The service will be available at <http://localhost:4321>

To build a production image using Docker, follow these steps:
To build an image using Docker, follow these steps:

- Build the image: `docker build -t tumcalproxy .`
- Run the container: `docker run -p 4321:4321 tumcalproxy`
- ```sh
docker compose -f docker-compose.local.yaml up --build
```
- The service will be available at <http://localhost:4321>
12 changes: 12 additions & 0 deletions docker-compose.local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
cal-proxy:
build: .
ports:
- 4321:4321
restart: always
# security
read_only: true
user: "1000:3000"
privileged: false
cap_drop:
- ALL
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ services:

networks:
- traefik_traefik
# security
read_only: true
user: "1000:3000"
privileged: false
cap_drop:
- ALL

networks:
traefik_traefik:
Expand Down

0 comments on commit 1363604

Please sign in to comment.