- clone
git clone https://github.com/makino-makino/neo-polling
cd neo-polling
- set env
PASSWORD="email password"
EMAIL_FROM="email address"
PRIVKEY="pkcs8 private key"
PUBKEY="pkcs8 public key"
TIME="time to start vote"
DEPLOY_HOST="server hostname" # default to localhost
SERV_ENV=dev # change to `prod` to run in production env
INCUBATOR_PASS="BASIC auth password"
- create empty mount points
mkdir -p data/certbot/{www,conf}
- compile crypto module
cd crypto
docker-compose up
- (production deploy only) generate TLS certificate
cd ../
./init-letsencrypt.sh
NOTE: If you need to renew certificate, run following.
docker-compose up certbot
- run server
cd ../ # if you ran 4., skip this
docker-compose up
You can send blind signature email using /incubator
.
It requires BASIC auth, with username incubator
and password defined in .env
.
First, run:
pip3 install -r requirements.txt
Then run chromedriver-path
, and replace chromedriver_path
variable string with the output. For example,
$ chromedriver-path
/opt/homebrew/lib/python3.9/site-packages/chromedriver_binary
chromedriver_path = "/opt/homebrew/lib/python3.9/site-packages/chromedriver_binary/chromedriver" # previous output
Finally, you can run the integrated test:
python3 integrated-test.py
Docker のログは、何もしなくても /var/lib/docker/containers
以下に保存される。
各コンテナのログを見るときは、以下のようにする。
docker inspect --format='{{.LogPath}}' neo-polling_api_1
# e.g.) /var/lib/docker/containers/4598a887451112374f717b28ab56b12eb9687d20be1db9033c700a3e6bc4e056/4598a887451112374f717b28ab56b12eb9687d20be1db9033c700a3e6bc4e056-json.log
sudo less /var/lib/docker/containers/4598a887451112374f717b28ab56b12eb9687d20be1db9033c700a3e6bc4e056/4598a887451112374f717b28ab56b12eb9687d20be1db9033c700a3e6bc4e056-json.log