Skip to content

Commit aa5c7f7

Browse files
committed
remove nginx
1 parent bdd5cf6 commit aa5c7f7

File tree

10 files changed

+33
-275
lines changed

10 files changed

+33
-275
lines changed

client/.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
NEXT_PUBLIC_API_URL=https://api.teamserverdown.devops.aet.cit.tum.de
1+
NEXT_PUBLIC_API_URL=http://localhost:9001
22
KEYCLOAK_CLIENT_ID=webclient
33
KEYCLOAK_ISSUER=http://keycloak:8080/realms/development
44
NEXTAUTH_URL=http://localhost:3000/api/auth/

client/src/app/api/auth/[...nextauth]/route.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,4 @@ const authOptions: NextAuthOptions = {
8787
};
8888
const handler = NextAuth(authOptions);
8989

90-
console.log(authOptions.providers)
91-
9290
export { handler as GET, handler as POST };

docker-compose.yml

Lines changed: 28 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,13 @@
11
name: team-server-down
22

33
services:
4-
nginx:
5-
restart: always
6-
image: nginx:stable-alpine
7-
healthcheck:
8-
test: "curl -f http://localhost:80 || exit 1"
9-
interval: 5s
10-
volumes:
11-
- ./docker/nginx/conf.d:/etc/nginx/conf.d:ro
12-
- ./docker/nginx/cert.crt:/etc/nginx/cert.crt:ro
13-
- ./docker/nginx/private.key:/etc/nginx/private.key:ro
14-
depends_on:
15-
# - server
16-
- keycloak
17-
ports:
18-
- "80:80"
19-
- "443:443"
20-
networks:
21-
- server
22-
234
keycloak:
245
restart: always
256
build:
267
context: ./docker/keycloak
278
dockerfile: Dockerfile
289
target: development
2910
ports:
30-
- "8443:8443"
3111
- "8080:8080"
3212
command:
3313
- start-dev
@@ -43,44 +23,42 @@ services:
4323
KC_DB_URL: jdbc:postgresql://db:5432/keycloak
4424
KC_DB_USERNAME: root
4525
KC_DB_PASSWORD: password
46-
KC_HTTPS_CERTIFICATE_FILE: /opt/keycloak/conf/server.crt.pem
47-
KC_HTTPS_CERTIFICATE_KEY_FILE: /opt/keycloak/conf/server.key.pem
4826
KC_HOSTNAME: localhost
4927
KEYCLOAK_ADMIN: admin
5028
KEYCLOAK_ADMIN_PASSWORD: password
29+
KC_HTTP_ENABLED: true
30+
KC_HOSTNAME_STRICT: false
5131
volumes:
5232
- ./docker/keycloak/realm-export.json:/opt/keycloak/data/import/realm-export.json:ro
53-
- ./docker/keycloak/cert.crt:/opt/keycloak/conf/server.crt.pem:ro
54-
- ./docker/keycloak/private.key:/opt/keycloak/conf/server.key.pem:ro
5533
networks:
5634
- server
5735

58-
# server:
59-
# restart: always
60-
# build:
61-
# context: ./server
62-
# dockerfile: Dockerfile
63-
# target: development
64-
# healthcheck:
65-
# test: ["CMD", "curl", "-f", "http://server:8080/"]
66-
# interval: 10s
67-
# timeout: 3s
68-
# environment:
69-
# DB_HOST: ${DB_HOST:-db}
70-
# DB_PORT: ${DB_PORT:-5432}
71-
# DB_NAME: ${DB_NAME:-main}
72-
# DB_USER: ${DB_USER:-root}
73-
# DB_PASSWORD: ${DB_PASSWORD:-password}
74-
# ALLOWED_ORIGIN: ${ALLOWED_ORIGIN:-https://teamserverdown.devops.aet.cit.tum.de}
75-
# depends_on:
76-
# db:
77-
# condition: service_healthy
78-
# ports:
79-
# - "8080:8080"
80-
# volumes:
81-
# - ./server:/app
82-
# networks:
83-
# - server
36+
server:
37+
restart: always
38+
build:
39+
context: ./server
40+
dockerfile: Dockerfile
41+
target: development
42+
healthcheck:
43+
test: ["CMD", "curl", "-f", "http://localhost:9001/"]
44+
interval: 10s
45+
timeout: 3s
46+
environment:
47+
DB_HOST: ${DB_HOST:-db}
48+
DB_PORT: ${DB_PORT:-5432}
49+
DB_NAME: ${DB_NAME:-main}
50+
DB_USER: ${DB_USER:-root}
51+
DB_PASSWORD: ${DB_PASSWORD:-password}
52+
ALLOWED_ORIGIN: ${ALLOWED_ORIGIN:-http://localhost:3000}
53+
depends_on:
54+
db:
55+
condition: service_healthy
56+
ports:
57+
- "9001:9001"
58+
volumes:
59+
- ./server:/app
60+
networks:
61+
- server
8462

8563
client:
8664
restart: always

docker/keycloak/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/keycloak/keycloak:24.0.1 as development
1+
FROM quay.io/keycloak/keycloak:24.0.1 AS development
22

33
ENV KC_HEALTH_ENABLED=true
44
ENV KC_METRICS_ENABLED=true
@@ -9,8 +9,6 @@ FROM quay.io/keycloak/keycloak:24.0.1
99

1010
COPY --from=development /opt/keycloak/ /opt/keycloak/
1111

12-
COPY ./server.crt.pem /opt/keycloak/conf/server.crt.pem
13-
COPY ./server.key.pem /opt/keycloak/conf/server.key.pem
1412
COPY ./realm-export.json /opt/keycloak/data/import/realm-export.json
1513

1614
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]

docker/keycloak/cert.crt

Lines changed: 0 additions & 25 deletions
This file was deleted.

docker/keycloak/private.key

Lines changed: 0 additions & 28 deletions
This file was deleted.

docker/nginx/cert.crt

Lines changed: 0 additions & 33 deletions
This file was deleted.

docker/nginx/conf.d/web.conf

Lines changed: 0 additions & 81 deletions
This file was deleted.

docker/nginx/private.key

Lines changed: 0 additions & 52 deletions
This file was deleted.

server/src/main/resources/application.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
server:
2+
port: 9091
3+
14
spring:
25
datasource:
36
url: jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}

0 commit comments

Comments
 (0)