Skip to content

Commit

Permalink
remove redis, add sentry setup
Browse files Browse the repository at this point in the history
  • Loading branch information
MickVermeulen committed Feb 20, 2021
1 parent a4341ae commit ab552d3
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 44 deletions.
3 changes: 3 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ POSTGRES_USER=uchu
POSTGRES_PASSWORD=uchu
POSTGRES_DB=uchu

# Optional sentry setup
# SENTRY_DSN=https://link/to/sentry/dsn

# Docker networking setup, can be left unchanged
DATABASE_PORT=5432
REDIS_PORT=6379
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Create a data folder which will store your database files to ensure no loss of d

```bash
mkdir pg-data
mkdir redis-data
```

## Running
Expand All @@ -45,7 +44,7 @@ docker-compose build
docker-compose up -d
```

This runs Uchu in the background along with Postgres and Redis. You can attach to the `Uchu.Master` shell using:
This runs Uchu in the background along with Postgres. You can attach to the `Uchu.Master` shell using:

```bash
docker attach uchudocker_uchu_1
Expand Down
7 changes: 0 additions & 7 deletions Redis.Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion Uchu
Submodule Uchu updated from e85c70 to 92aad5
15 changes: 9 additions & 6 deletions Uchu.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
COPY Uchu config.default.xml .env cert.pfx* ./

RUN apk update && apk add --no-cache gettext curl python3 py3-pip
RUN pip install uchu-cli

RUN set -o allexport && source .env && set +o allexport && envsubst < config.default.xml > config.xml
RUN dotnet build --configuration Release

# Adds the uchu cli as a top level command
ENV ENV="/root/.ashrc"
RUN pip install uchu-cli
RUN echo "alias cli=\"python3 -m uchu-cli\"" > "$ENV"

ENTRYPOINT ["dotnet", "Uchu.Master/bin/Release/netcoreapp3.1/Uchu.Master.dll"]
COPY Uchu .
RUN dotnet build --configuration Release

# Dynamically build the config file
COPY config.default.xml .env cert.pfx* ./
RUN set -o allexport && source .env && set +o allexport && envsubst < config.default.xml > config.xml

ENTRYPOINT ["dotnet", "Uchu.Master/bin/Release/netcoreapp3.1/Uchu.Master.dll"]
5 changes: 1 addition & 4 deletions config.default.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Uchu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SentryDsn>$SENTRY_DSN</SentryDsn>
<Database>
<Provider>postgres</Provider>
<Database>$POSTGRES_DB</Database>
Expand Down Expand Up @@ -42,10 +43,6 @@
<Domain>localhost</Domain>
<Port>10000</Port>
</Api>
<Cache>
<Host>redis</Host>
<Port>6379</Port>
</Cache>
<Sso>
<Domain />
</Sso>
Expand Down
17 changes: 1 addition & 16 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,12 @@ services:
# - db
# ports:
# - ${ADMINER_PORT}:8080
redis:
build:
context: .
dockerfile: Redis.Dockerfile
env_file:
- .env
image: myredis
privileged: true
command: sh -c "./redis.sh"
volumes:
- ${REDIS_DATA_FOLDER}:/data:rw
expose:
- 6379
restart: always
uchu:
build:
context: .
dockerfile: Uchu.Dockerfile
depends_on:
- db
- redis
env_file:
- .env
volumes:
Expand All @@ -58,4 +43,4 @@ services:
- ${UCHU_SERVER_PORT}:21836/udp
- ${UCHU_AUTH_PORT}:40000/udp
tty: true
stdin_open: true
stdin_open: true
Empty file removed redis.conf
Empty file.
8 changes: 0 additions & 8 deletions redis.sh

This file was deleted.

0 comments on commit ab552d3

Please sign in to comment.