Merge branch 'atlantis' into 'master'
Merge Atlantis See merge request htwkmooc/codeocean!1
This commit is contained in:
@ -37,6 +37,7 @@ default: &default
|
|||||||
runner_management:
|
runner_management:
|
||||||
# When enabled, CodeOcean delegates the handling and management of (containerized) runners
|
# When enabled, CodeOcean delegates the handling and management of (containerized) runners
|
||||||
# to a dedicated runner management. Otherwise, code executions are performed locally using
|
# to a dedicated runner management. Otherwise, code executions are performed locally using
|
||||||
|
#<% if ENV['POSEIDON_HOST'] != '' -%>
|
||||||
# Docker and without pre-warming support (one container per execution).
|
# Docker and without pre-warming support (one container per execution).
|
||||||
enabled: true
|
enabled: true
|
||||||
# The strategy to use. Possible values are: poseidon, docker_container_pool
|
# The strategy to use. Possible values are: poseidon, docker_container_pool
|
||||||
@ -44,7 +45,13 @@ default: &default
|
|||||||
# The root URL of the runner management to use (include any API prefix if required)
|
# The root URL of the runner management to use (include any API prefix if required)
|
||||||
# If a hostname is specified and the target host is reachable via IPv6, the WebSocket
|
# If a hostname is specified and the target host is reachable via IPv6, the WebSocket
|
||||||
# connection might not use the IPv6-to-IPv4 fallback but rather fail unexpectedly.
|
# connection might not use the IPv6-to-IPv4 fallback but rather fail unexpectedly.
|
||||||
url: http://127.0.0.1:7200/api/v1
|
url: http://poseidon:7200/api/v1
|
||||||
|
#url: http://<%= ENV['POSEIDON_HOST'] %>/api/v1
|
||||||
|
#<% else %>
|
||||||
|
#enabled: false
|
||||||
|
#strategy: poseidon
|
||||||
|
#url: http://poseidon.example.org/
|
||||||
|
#<% end -%>
|
||||||
# The root certificate authority to trust for TLS connections to the runner management (Poseidon only)
|
# The root certificate authority to trust for TLS connections to the runner management (Poseidon only)
|
||||||
# ca_file: /example/certificates/ca.crt
|
# ca_file: /example/certificates/ca.crt
|
||||||
# The authorization token for connections to the runner management (Poseidon only)
|
# The authorization token for connections to the runner management (Poseidon only)
|
||||||
|
@ -3,7 +3,7 @@ default: &default
|
|||||||
pool: 16
|
pool: 16
|
||||||
username: <%= ENV['POSTGRES_USER'] %>
|
username: <%= ENV['POSTGRES_USER'] %>
|
||||||
password: <%= ENV['POSTGRES_PASSWORD'] %>
|
password: <%= ENV['POSTGRES_PASSWORD'] %>
|
||||||
host: db
|
host: codeocean-db
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *default
|
<<: *default
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
services:
|
services:
|
||||||
db:
|
codeocean-db:
|
||||||
image: postgres:16
|
image: postgres:16
|
||||||
volumes:
|
volumes:
|
||||||
- db_data:/var/lib/postgresql/data
|
- db_data:/var/lib/postgresql/data
|
||||||
@ -8,7 +8,7 @@ services:
|
|||||||
POSTGRES_PASSWORD: secure_password
|
POSTGRES_PASSWORD: secure_password
|
||||||
POSTGRES_DB: codeocean_production
|
POSTGRES_DB: codeocean_production
|
||||||
|
|
||||||
app:
|
codeocean:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@ -18,7 +18,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "7123:7000"
|
- "7123:7000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- codeocean-db
|
||||||
- prometheus
|
- prometheus
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: codeocean_user
|
POSTGRES_USER: codeocean_user
|
||||||
@ -45,18 +45,9 @@ services:
|
|||||||
- ./nginx/certs:/etc/nginx/certs
|
- ./nginx/certs:/etc/nginx/certs
|
||||||
ports:
|
ports:
|
||||||
- "443:443"
|
- "443:443"
|
||||||
depends_on:
|
- "80:80"
|
||||||
- app
|
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
poseidon:
|
|
||||||
ports:
|
|
||||||
- "7200:7200"
|
|
||||||
network_mode: host
|
|
||||||
volumes:
|
|
||||||
- ./configuration.yaml:/go/src/app/configuration.yaml
|
|
||||||
restart: unless-stopped
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db_data:
|
db_data:
|
||||||
config:
|
config:
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
require 'resolv-replace'
|
||||||
|
|
||||||
class Runner::Strategy::Poseidon < Runner::Strategy
|
class Runner::Strategy::Poseidon < Runner::Strategy
|
||||||
ERRORS = %w[NOMAD_UNREACHABLE NOMAD_OVERLOAD NOMAD_INTERNAL_SERVER_ERROR UNKNOWN].freeze
|
ERRORS = %w[NOMAD_UNREACHABLE NOMAD_OVERLOAD NOMAD_INTERNAL_SERVER_ERROR UNKNOWN].freeze
|
||||||
|
@ -6,10 +6,19 @@ server {
|
|||||||
ssl_certificate_key /etc/nginx/certs/codeocean.key;
|
ssl_certificate_key /etc/nginx/certs/codeocean.key;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://app:7000; # Ersetzen Sie 'frontend' durch den Namen Ihres Frontend-Services und '80' durch den Port, auf dem Ihr Frontend läuft
|
proxy_pass http://codeocean:7000;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name localhost;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://codeocean:7000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user