Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ackrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--ignore-dir=.devenv
--ignore-dir=.venv
28 changes: 28 additions & 0 deletions .config/starship.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'

# Inserts a blank line between shell prompts
add_newline = true

# Replace the '❯' symbol in the prompt with '➜'
[character] # The name of the module we are configuring is 'character'
success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'

[docker_context]
disabled = true

[container]
disabled = true

[nix_shell]
disabled = true

[python]
disabled = true

[kubernetes]
disabled = true

# Disable the package module, hiding it from the prompt completely
[package]
disabled = true
43 changes: 43 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "election-orchestra",
"dockerComposeFile": "docker-compose.yml",
"service": "devcontainer",
"updateContentCommand": "devenv ci",
"workspaceFolder": "/workspace",
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
},
"customizations": {
"vscode": {
"extensions": [
// run commands on save
// https://marketplace.visualstudio.com/items?itemName=fsevenm.run-it-on
"fsevenm.run-it-on",

// Python IDE support
"ms-python.python",

// Docker for Visual Studio Code
"ms-azuretools.vscode-docker",

// direnv support
"mkhl.direnv",

// Nix language support
"jnoortheen.nix-ide",

// Markdown support and previsualization
"yzhang.markdown-all-in-one",

// Debugging
"vadimcn.vscode-lldb",

// Allows to use Alt+Q (or Option+Q in mac) to rewrap lines
"stkb.rewrap",

// TOML support, for poetry
"tamasfe.even-better-toml"
]
}
}
}
12 changes: 12 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "3.6"
services:
devcontainer:
image: ghcr.io/cachix/devenv:latest
volumes:
# Update this to wherever you want VS Code to mount the folder of your project
- ..:/workspace:cached
# Required for ptrace-based debuggers like C++, Go, and Rust
cap_add:
- SYS_PTRACE
security_opt:
- label:disable
33 changes: 33 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
EO_FLASK_APP=election_orchestra.app:app
EO_FLASK_RUN_HOST=0.0.0.0
EO_SERVICE_PORT=8080
EO_FLASK_RUN_PORT=8081
EO_VFORK_SERVER_PORT=8082
EO_TEST_PORT=8083
EO_VFORK_HINT_SERVER_PORT=8084
EO_MAX_NUM_QUESTIONS_PER_ELECTION=10
EO_AUTOACCEPT_REQUESTS=True
EO_PRIVATE_DATA_PATH=/datastore/private
EO_PUBLIC_DATA_PATH=/datastore/public
EO_SSL_CERT_DIR=/datastore/certs/
EO_SSL_CERT_PATH=/datastore/certs/cert.pem
EO_SSL_KEY_PATH=/datastore/certs/cert.key.pem
EO_SSL_CALIST_PATH=/datastore/certs/cert.calist.pem
EO_SSL_HEADER_NAME=HTTP_X_SENDER_SSL_CERTIFICATE
ALLOW_ONLY_SSL_CONNECTIONS=False

CLASSPATH=/share/java/jecn.jar:/share/java/jgmpmee.jar:/share/java/mixnet.jar
VFORK_RANDOM_SOURCE=/datastore/mixnet_random_source

TRUSTEES=trustee1,trustee2
ETCD_ENDPOINT=http://etcd_service:2379

NGINX_ERROR_LOG_LEVEL=info
NGINX_HTTP_MAX_BODY_SIZE=2m
NGINX_HTTP_CLIENT_MAX_HEADER_SIZE=8k
GUNICORN_THREADS=8

COMPOSE_PROFILES=trustee1,trustee2
COMPOSE_PROJECT_NAME=trustee-network

STARSHIP_CONFIG=/workspaces/election-orchestra/.config/starship.toml
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
custom_settings.py
*.pyc
*.sqlite

# Devenv
.devenv*
devenv.local.nix

# Direnv
.direnv/

# nix
result

# execution
activity.json.log
data/
84 changes: 0 additions & 84 deletions app.py

This file was deleted.

53 changes: 0 additions & 53 deletions base_settings.py

This file was deleted.

Loading