added docker support
This commit is contained in:
parent
813a9c80db
commit
b65c4e306d
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM rust:1 as builder
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN cargo install --path .
|
||||
|
||||
FROM debian:buster-slim as runner
|
||||
COPY --from=builder /usr/local/cargo/bin/api /usr/local/bin/api
|
||||
ENV ROCKET_ADDRESS=0.0.0.0
|
||||
EXPOSE 3000
|
||||
CMD ["api"]
|
@ -7,5 +7,17 @@ services:
|
||||
POSTGRES_PASSWORD: meincantor_password
|
||||
POSTGRES_USER: meincantor
|
||||
POSTGRES_DB: meincantor_db
|
||||
ports:
|
||||
- "5432:5432"
|
||||
expose: '5432'
|
||||
api:
|
||||
image: lxdb/meincantor-api
|
||||
restart: always
|
||||
environment:
|
||||
IW_TIMETABLE_URL: https://stundenplan24.de/EXAMPLE_SCHOOL/mobil/mobdaten
|
||||
IW_TIMETABLE_USER: EXAMPLE_USER
|
||||
IW_TIMETABLE_PASSWORD: EXAMPLE_PASSWORD
|
||||
JWT_SECRET: EXAMPLE_SECRET
|
||||
JWT_ISSUER: Georg-Cantor-Gymnasium Halle(Saale)
|
||||
KC_OPENID_TOKEN_ENDPOINT: https://example.keycloak.com/auth/realms/EXAMPLE_REALM/protocol/openid-connect/token
|
||||
KC_OPENID_USERINFO_ENDPOINT: https://example.keycloak.com/auth/realms/EXAMPLE_REALM/protocol/openid-connect/userinfo
|
||||
KC_CLIENT_ID: EXAMPLE_CLIENT
|
||||
ROCKET_DATABASES: '{timetable={url="postgres://meincantor:meincantor_password@postgres/meincantor_db"}}''
|
||||
|
0
static/.gitkeep
Normal file
0
static/.gitkeep
Normal file
Reference in New Issue
Block a user