-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker-compose prod deployment template (#952)
- Loading branch information
1 parent
213dbc7
commit 4da9b4d
Showing
16 changed files
with
306 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '2.1' | ||
services: | ||
antares-antarest: | ||
user: UID:GID | ||
antares-antarest-watcher: | ||
user: UID:GID | ||
antares-antarest-matrix-gc: | ||
user: UID:GID | ||
postgresql: | ||
user: UID:GID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
version: '2.1' | ||
services: | ||
antares-antarest: | ||
image: antarest:latest | ||
container_name : antarest | ||
environment : | ||
- UVICORN_ROOT_PATH=/api | ||
depends_on: | ||
- redis | ||
- postgresql | ||
volumes: | ||
- ./resources/deploy/examples:/workspaces | ||
- ./resources/deploy/tmp:/antarest_tmp_dir | ||
- ./resources/deploy/matrices:/matrixstore | ||
- ./resources/deploy/config.prod.yaml:/resources/application.yaml | ||
- ./resources/deploy/logs:/logs | ||
- ./resources/deploy/gunicorn.py:/conf/gunicorn.py | ||
- ./antares-8.2.2-Ubuntu-20.04/bin:/antares_simulator | ||
antares-antarest-watcher: | ||
image: antarest:latest | ||
container_name: antarest-watcher | ||
volumes: | ||
- ./resources/deploy/examples:/workspaces | ||
- ./resources/deploy/tmp:/antarest_tmp_dir | ||
- ./resources/deploy/matrices:/matrixstore | ||
- ./resources/deploy/config.prod.yaml:/resources/application.yaml | ||
- ./resources/deploy/logs:/logs | ||
depends_on: | ||
- antares-antarest | ||
command: watcher | ||
antares-antarest-matrix-gc: | ||
image: antarest:latest | ||
container_name : antarest-matrix-gc | ||
volumes: | ||
- ./resources/deploy/examples:/workspaces | ||
- ./resources/deploy/tmp:/antarest_tmp_dir | ||
- ./resources/deploy/matrices:/matrixstore | ||
- ./resources/deploy/config.prod.yaml:/resources/application.yaml | ||
- ./resources/deploy/logs:/logs | ||
depends_on: | ||
- antares-antarest | ||
command: matrix_gc | ||
postgresql: | ||
image: postgres:latest | ||
container_name: postgres | ||
environment: | ||
- POSTGRES_PASSWORD=somepass | ||
- PG_DATA=/var/lib/postgresql/data/pgdata | ||
volumes: | ||
- ./resources/deploy/db:/var/lib/postgresql/data | ||
command: [ "postgres", "-c", "log_statement=all", "-c", "log_destination=stderr" ] | ||
redis: | ||
image: redis:latest | ||
container_name : redis | ||
nginx: | ||
image: nginx:latest | ||
container_name: nginx | ||
depends_on: | ||
- antares-antarest | ||
ports: | ||
- 80:80 | ||
volumes: | ||
- ./resources/deploy/nginx.conf:/etc/nginx/conf.d/default.conf:ro | ||
- ./webapp/build:/www | ||
- ./resources/deploy/web.config.json:/www/config.json:ro |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
security: | ||
disabled: false | ||
jwt: | ||
key: secretkeytochange | ||
login: | ||
admin: | ||
pwd: admin | ||
external_auth: | ||
url: "" | ||
default_group_role: 10 | ||
|
||
db: | ||
url: "postgresql://postgres:somepass@postgresql:5432/postgres" | ||
admin_url: "postgresql://postgres:somepass@postgresql:5432/postgres" | ||
pool_recycle: 3600 | ||
|
||
storage: | ||
tmp_dir: /antarest_tmp_dir | ||
archive_dir: /studies/archives | ||
matrixstore: /matrixstore | ||
matrix_gc_dry_run: true | ||
workspaces: | ||
default: # required, no filters applied, this folder is not watched | ||
path: /workspaces/internal_studies/ | ||
# other workspaces can be added | ||
# if a directory is to be ignored by the watcher, place a file named AW_NO_SCAN inside | ||
tmp: | ||
path: /workspaces/studies/ | ||
# filter_in: ['.*'] # default to '.*' | ||
# filter_out: [] # default to empty | ||
# groups: [] # default empty | ||
|
||
launcher: | ||
default: local | ||
local: | ||
binaries: | ||
800: /antares_simulator/antares-8.2-solver | ||
# slurm: | ||
# local_workspace: path/to/workspace | ||
# username: username | ||
# hostname: 0.0.0.0 | ||
# port: 22 | ||
# private_key_file: path/to/key | ||
# key_password: key_password | ||
# password: password_is_optional_but_necessary_if_key_is_absent | ||
# default_wait_time: 900 | ||
# default_time_limit: 172800 | ||
# default_n_cpu: 12 | ||
# default_json_db_name: launcher_db.json | ||
# slurm_script_path: /path/to/launchantares_v1.1.3.sh | ||
# db_primary_key: name | ||
# antares_versions_on_remote_server : | ||
# - "610" | ||
# - "700" | ||
# - "710" | ||
# - "720" | ||
# - "800" | ||
|
||
|
||
debug: false | ||
|
||
root_path: "/api" | ||
|
||
#tasks: | ||
# max_workers: 5 | ||
server: | ||
worker_threadpool_size: 12 | ||
# services: | ||
# - watcher | ||
|
||
logging: | ||
level: INFO | ||
# logfile: /logs/antarest.log | ||
# json: true | ||
|
||
# Uncomment these lines to use redis as a backend for the eventbus | ||
# It is required to use redis when using this application on multiple workers in a preforked model like gunicorn for instance | ||
redis: | ||
host: redis | ||
port: 6379 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.