mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
cors-school
This commit is contained in:
parent
c0ed8f61fc
commit
ab7d6a91d6
6 changed files with 88 additions and 4 deletions
|
|
@ -18,6 +18,12 @@
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
name: root
|
name: root
|
||||||
shell: /usr/bin/fish
|
shell: /usr/bin/fish
|
||||||
|
- name: Install useful tools
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- htop
|
||||||
- name: Install keyring packages
|
- name: Install keyring packages
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,14 @@
|
||||||
state: directory
|
state: directory
|
||||||
mode: u=rwx,g=rx,o=rx
|
mode: u=rwx,g=rx,o=rx
|
||||||
#####
|
#####
|
||||||
|
# APP: cors-school, /apps/cors-school
|
||||||
|
#####
|
||||||
|
- name: Create /apps/cors-school
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /apps/cors-school
|
||||||
|
state: directory
|
||||||
|
mode: u=rwx,g=rx,o=rx
|
||||||
|
#####
|
||||||
# END: docker compose up!
|
# END: docker compose up!
|
||||||
#####
|
#####
|
||||||
# We want this to be last so that all app-specific config has been done.
|
# We want this to be last so that all app-specific config has been done.
|
||||||
|
|
|
||||||
|
|
@ -45,3 +45,12 @@ api.hugo-chat.nilstrieb.dev {
|
||||||
hugo-chat.nilstrieb.dev {
|
hugo-chat.nilstrieb.dev {
|
||||||
reverse_proxy * localhost:5002
|
reverse_proxy * localhost:5002
|
||||||
}
|
}
|
||||||
|
|
||||||
|
api.cors-school.nilstrieb.dev {
|
||||||
|
import cors https://cors-school.nilstrieb.dev
|
||||||
|
reverse_proxy * localhost:5003
|
||||||
|
}
|
||||||
|
|
||||||
|
cors-school.nilstrieb.dev {
|
||||||
|
reverse_proxy * localhost:5004
|
||||||
|
}
|
||||||
|
|
|
||||||
7
new/vps2/README.md
Normal file
7
new/vps2/README.md
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
## ports
|
||||||
|
|
||||||
|
- 5000: registry
|
||||||
|
- 5001: hugo-chat server
|
||||||
|
- 5002: hugo-chat client
|
||||||
|
- 5003: cors-school server
|
||||||
|
- 5004: cors-school client
|
||||||
|
|
@ -28,6 +28,7 @@ services:
|
||||||
environment:
|
environment:
|
||||||
BOT_TOKEN: "${KILLUA_BOT_TOKEN}"
|
BOT_TOKEN: "${KILLUA_BOT_TOKEN}"
|
||||||
KILLUA_JSON_PATH: /app/config/trivia_questions.json
|
KILLUA_JSON_PATH: /app/config/trivia_questions.json
|
||||||
|
#### Hugo Chat
|
||||||
hugo_chat_db:
|
hugo_chat_db:
|
||||||
container_name: hugo-chat-db
|
container_name: hugo-chat-db
|
||||||
image: "postgres:latest"
|
image: "postgres:latest"
|
||||||
|
|
@ -53,6 +54,7 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "5002:80"
|
- "5002:80"
|
||||||
|
#### Karin
|
||||||
karin_bot_db:
|
karin_bot_db:
|
||||||
container_name: karin-bot-db
|
container_name: karin-bot-db
|
||||||
image: "mongo:latest"
|
image: "mongo:latest"
|
||||||
|
|
@ -74,5 +76,52 @@ services:
|
||||||
- "/apps/karin-bot/.env"
|
- "/apps/karin-bot/.env"
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
#### Cors School
|
||||||
|
cors_school_db:
|
||||||
|
container_name: cors-school-db
|
||||||
|
image: "postgres:latest"
|
||||||
|
restart: always
|
||||||
|
env_file:
|
||||||
|
# POSTGRES_PASSWORD=PASSWORD
|
||||||
|
- "/apps/cors-school/db.env"
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: davinci
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
cors_school_server:
|
||||||
|
container_name: cors-school-server
|
||||||
|
image: "docker.nilstrieb.dev/cors-school-server:09c5d526"
|
||||||
|
restart: always
|
||||||
|
env_file:
|
||||||
|
# DATABASE_URL=postgres://postgres:PASSWORD@cors-school-db/davinci
|
||||||
|
# JWT_SECRET=secret
|
||||||
|
- "/apps/cors-school/server.env"
|
||||||
|
environment:
|
||||||
|
RUST_LOG: info
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
ports:
|
||||||
|
- "5003:8080"
|
||||||
|
cors_school_client:
|
||||||
|
container_name: cors-school-client
|
||||||
|
image: "docker.nilstrieb.dev/cors-school-client:09c5d526"
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "5004:80"
|
||||||
|
cors_school_bot:
|
||||||
|
container_name: cors-school-bot
|
||||||
|
image: "docker.nilstrieb.dev/cors-school-bot:09c5d526"
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
# DISCORD_TOKEN=
|
||||||
|
# CORS_API_TOKEN=
|
||||||
|
- "/apps/cors-school/bot.env:/.env"
|
||||||
|
environment:
|
||||||
|
APPLICATION_ID: "867725027080142870"
|
||||||
|
RUST_LOG: info
|
||||||
|
BACKEND_URL: "http://cors-school-server:8080/api"
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
internal:
|
internal:
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,18 @@
|
||||||
set -eu pipefail
|
set -eu pipefail
|
||||||
|
|
||||||
# frontend
|
# frontend
|
||||||
docker run --net internal --name cors-school-frontend -d --restart=always docker.nilstrieb.dev/cors-school-frontend:1.0.0
|
docker run --net internal --name cors-school-frontend -d \
|
||||||
|
--restart=always docker.nilstrieb.dev/cors-school-frontend:1.0.0
|
||||||
|
|
||||||
# postgres
|
# postgres
|
||||||
docker run --net internal -d --name cors-postgres -e POSTGRES_PASSWORD=hugo58hugo -e POSTGRES_DB=davinci postgres
|
docker run --net internal -d --name cors-postgres \
|
||||||
|
-e POSTGRES_PASSWORD=hugo58hugo -e POSTGRES_DB=davinci postgres
|
||||||
|
|
||||||
# backend
|
# backend
|
||||||
docker run --net internal -d --name cors-school-backend -e DATABASE_URL=postgres://postgres:hugo58hugo@cors-postgres/davinci -e RUST_LOG=info -e JWT_SECRET='redacted' docker.nilstrieb.dev/cors-school-backend:1.0
|
docker run --net internal -d --name cors-school-backend \
|
||||||
|
-e DATABASE_URL=postgres://postgres:hugo58hugo@cors-postgres/davinci \
|
||||||
|
-e RUST_LOG=info -e JWT_SECRET='redacted' docker.nilstrieb.dev/cors-school-backend:1.0
|
||||||
|
|
||||||
# bot
|
# bot
|
||||||
docker run --net internal -d --name cors-school-bot -v "$(pwd)/env:/.env" docker.nilstrieb.dev/cors-school-bot:1.0
|
docker run --net internal -d --name cors-school-bot \
|
||||||
|
-v "$(pwd)/env:/.env" docker.nilstrieb.dev/cors-school-bot:1.0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue