- Docker
- Docker compose
Make sure you created usergroup for docker.
Example of environment setting described in env.sh
file.
Telegram bot: ask @BotFather to create new bot and use provided token in guide next!
Note: in case you have troubles with TG_KEY forwarding, you can explicitly put it in docker-compose.yaml in DDS_TELEGRAM_BOT_APIKEY variable of stack service.
If you run it on windows, make sure your drive configurated to be mounted as here.
# Key env variable on windows
set TG_KEY=[your api key from @botfather]
Then repeating of commands from deploy.sh will lead you to correct deploy even on windows.
If you run server in Russia, telegram connection can be rejected each 30 seconds and back will restart.
fast deploy:
export TG_KEY=[your api key from @botfather]
. deploy.sh
build step by step:
# Frontend
docker build -t front:latest front/
# Backend
docker build -t back:latest back/
# Stack
docker build -t dds-server:latest .
run:
# Full stack
# raw token expected. No brackets or quotes.
export TG_KEY=[your api key from @botfather]
docker-compose up -d
Database state will be stored in ./data folder.
Back (build go): https://www.callicoder.com/docker-golang-image-container-example/
Front: https://buddy.works/guides/how-dockerize-node-application
Back (save BD state): https://hub.docker.com/_/mysql